From 2729e93845354dbea08d47de47e036d54af23760 Mon Sep 17 00:00:00 2001 From: dengliming Date: Sun, 29 Sep 2024 23:17:00 +0800 Subject: [PATCH] fix --- .github/workflows/version-and-release.yml | 9 ++--- pom.xml | 45 +++++++++++++++-------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/version-and-release.yml b/.github/workflows/version-and-release.yml index 3043e7c..e61c69e 100644 --- a/.github/workflows/version-and-release.yml +++ b/.github/workflows/version-and-release.yml @@ -12,7 +12,6 @@ jobs: uses: actions/checkout@v4 - name: Set up Java with Maven cache - uses: actions/setup-java@v4 with: java-version: '8' @@ -30,18 +29,16 @@ jobs: if: ${{ github.event.release.tag_name }} - name: Install GPG key - run: | - cat <(echo -e "${{ secrets.OSSH_GPG_SECRET_KEY }}") | gpg --batch --import + cat <(echo -e "${{ secrets.GPG_SECRET }}") | gpg --batch --import gpg --list-secret-keys --keyid-format LONG - name: Publish to Maven - run: | mvn --no-transfer-progress \ --batch-mode \ - -Dgpg.passphrase='${{ secrets.OSSH_GPG_SECRET_KEY_PASSWORD }}' \ - -DskipTests deploy + -Dgpg.passphrase='${{ secrets.GPG_PASSWORD }}' \ + -DskipTests deploy -P sonatype-oss-release env: MAVEN_USERNAME: ${{secrets.OSSRH_USER}} diff --git a/pom.xml b/pom.xml index ce6f254..c654be4 100644 --- a/pom.xml +++ b/pom.xml @@ -286,24 +286,39 @@ - - - org.apache.maven.plugins - maven-gpg-plugin - ${gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - + + + sonatype-oss-release + + + + org.apache.maven.plugins + maven-gpg-plugin + ${gpg-plugin.version} + + + --pinentry-mode + loopback + + + + + sign-artifacts + verify + + sign + + + + + + + + + oss