From c88b65f98fe6ceb47a78f67accc133c13f9bfa6d Mon Sep 17 00:00:00 2001 From: jeremyhi Date: Tue, 10 Sep 2024 11:36:07 +0800 Subject: [PATCH] feat: gpg please reback (#48) * Revert "chore: use token to publishing (#46)" This reverts commit 115a259826b8ca76bf26b64bb5a927e6037796e7. * Revert "chore: remove gpg plugin (#47)" This reverts commit 22a47a2f9c546ec17a25503c07ac01b1d32f8456. --- .github/workflows/mvn_publish.yml | 3 +++ pom.xml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/mvn_publish.yml b/.github/workflows/mvn_publish.yml index f9bfaaa..dc01e68 100644 --- a/.github/workflows/mvn_publish.yml +++ b/.github/workflows/mvn_publish.yml @@ -30,9 +30,12 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Build with Maven run: mvn clean deploy --batch-mode -DskipTests -P release -B -U -e env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/pom.xml b/pom.xml index 3ffa7be..6bb8b71 100644 --- a/pom.xml +++ b/pom.xml @@ -90,6 +90,7 @@ 3.8.0 + 1.6 2.9.1 3.0.1 1.6.8 @@ -274,6 +275,26 @@ true + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + + sign + + verify + + + --pinentry-mode + loopback + + + + + org.apache.maven.plugins maven-source-plugin