From 2ad2d3d4fe5fb399819f931296fcdc8c31e2efbc Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Wed, 13 Mar 2024 17:15:20 +0100 Subject: [PATCH] fix(gpg): use env variable for passphrase --- .github/workflows/_reusable_build.yml | 5 +++++ pom.xml | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/_reusable_build.yml b/.github/workflows/_reusable_build.yml index b41f418..1db6eb2 100644 --- a/.github/workflows/_reusable_build.yml +++ b/.github/workflows/_reusable_build.yml @@ -24,6 +24,8 @@ on: required: true GPG_KEYNAME: required: true + GPG_PASSPHRASE: + required: true jobs: build: @@ -66,9 +68,12 @@ jobs: - name: Publish ${{ steps.version.outputs.version }} to Artifactory if: ${{ inputs.publishToArtifactory }} env: + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} ALT_DEPLOYMENT_REPOSITORY: ${{ endsWith(steps.version.outputs.version,'-SNAPSHOT') && format('snapshots::{0}', vars.SNAPSHOTS_REPOSITORY_URL) || format('staging::{0}', vars.STAGING_REPOSITORY_URL) }} run: ./mvnw --no-transfer-progress -B deploy -Dgpg.keyname=${{ secrets.GPG_KEYNAME }} -Prelease -DaltDeploymentRepository=${{env.ALT_DEPLOYMENT_REPOSITORY}} - name: Publish ${{ steps.version.outputs.version }} to Central # Never publish a Weekly build to Maven Central if: ${{ inputs.publishToCentral && !contains(steps.version.outputs.version,'W')}} + env: + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: ./mvnw --no-transfer-progress -B deploy -Dgpg.keyname=${{ secrets.GPG_KEYNAME }} -Possrh \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9c9c8d7..50e8ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 3.3.0 3.3.1 3.2.1 - 3.1.0 + 3.2.0 1.6.13 3.1.1 2.16.1 @@ -232,13 +232,6 @@ sign verify - - - - --pinentry-mode - loopback - -