From 26e4ab8d420d5d26f20337d99220e31abc1dd2a3 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Sun, 24 Dec 2023 01:18:42 +0800 Subject: [PATCH 1/2] fix OSSRH_GPG_SECRET_KEY 2 --- .github/workflows/maven_deploy.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/maven_deploy.yml b/.github/workflows/maven_deploy.yml index eba763a..e8c4a95 100644 --- a/.github/workflows/maven_deploy.yml +++ b/.github/workflows/maven_deploy.yml @@ -16,24 +16,15 @@ jobs: with: ref: 'main' fetch-depth: 0 - - name: Install gpg secret key - run: | - export GPG_TTY=$(tty) - echo -n ${{ secrets.OSSRH_GPG_SECRET_KEY }} | base64 --decode | gpg --import - name: Setup Java uses: actions/setup-java@v1 with: java-version: 11 - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_CENTRAL_TOKEN - - name: Deploy to Maven Central - run: | - cat ~/.m2/settings.xml - echo $MAVEN_USERNAME - echo $MAVEN_CENTRAL_TOKEN - mvn clean deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file + - name: Release Maven package + uses: samuelmeuli/action-maven-publish@v1 + with: + gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg_passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + nexus_username: ${{ secrets.OSSRH_USERNAME }} + nexus_password: ${{ secrets.OSSRH_TOKEN }} \ No newline at end of file From 09a6d290a779c41019f6f688f5e9b0a98cee903c Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Sun, 24 Dec 2023 01:30:34 +0800 Subject: [PATCH 2/2] fix OSSRH_GPG_SECRET_KEY 3 --- .github/workflows/maven_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_deploy.yml b/.github/workflows/maven_deploy.yml index e8c4a95..70d5f04 100644 --- a/.github/workflows/maven_deploy.yml +++ b/.github/workflows/maven_deploy.yml @@ -8,7 +8,7 @@ on: jobs: deploy: name: Deploy Snapshot - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout