From f975d723efea3a0f72e0843894de8dd09112ad67 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 3 Apr 2024 19:23:44 +0800 Subject: [PATCH] Fix release error --- .github/workflows/ci-cd.yml | 43 ++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0cb2ce127..7f39ce27d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -138,8 +138,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up JDK - uses: QubitPi/hashicorp-aws/.github/actions/jdk-setup@master + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + server-id: ossrh + settings-path: ${{ github.workspace }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} - name: Configure settings.xml for Maven Central release uses: whelk-io/maven-settings-xml-action@v20 with: @@ -164,19 +172,24 @@ jobs: } } ] - - name: Configure GPG Key - run: | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${{ secrets.GPG_PUB_KEY }} - - git config --global user.signingkey ${{ secrets.GPG_PUB_KEY }} - - mkdir -p ~/.gnupg/ - - export GPG_TTY=$(tty) - - printf "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode > ~/.gnupg/private.key - chmod 777 ~/.gnupg/private.key - gpg --no-tty --import ~/.gnupg/private.key +# - name: Configure GPG Key +# run: | +# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${{ secrets.GPG_PUB_KEY }} +# +# git config --global user.signingkey ${{ secrets.GPG_PUB_KEY }} +# +# mkdir -p ~/.gnupg/ +# +# touch ~/.gnupg/gpg.conf +# echo "use-agent" >> ~/.gnupg/gpg.conf +# echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf +# +# touch ~/.gnupg/gpg-agent.conf +# echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf +# gpgconf --reload gpg-agent +# +# printf "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode > ~/.gnupg/private.key +# gpg --no-tty --import ~/.gnupg/private.key - name: Bump version run: | git pull