From 7d532fcb4c3d406372bc9e903cace2d6e386801f Mon Sep 17 00:00:00 2001 From: cccs-br Date: Thu, 28 Dec 2023 17:30:05 -0500 Subject: [PATCH] Try this out. --- .github/workflows/maven.yml | 7 +++++-- pom.xml | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fb980c2..30c58f4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -30,9 +30,12 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - + - name: Install gpg secret key + run: | + cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + gpg --list-secret-keys --keyid-format LONG - name: Build and Publish with Maven - run: mvn -B deploy --file pom.xml + run: mvn -B -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy --file pom.xml env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/pom.xml b/pom.xml index 0a5e894..81574c3 100644 --- a/pom.xml +++ b/pom.xml @@ -183,6 +183,26 @@ true + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + +