Skip to content

Commit

Permalink
Merge pull request #19 from gedestroy/release_fails_with_Unable_to_de…
Browse files Browse the repository at this point in the history
…crypt_gpg_passphrase

Release fails with unable to decrypt gpg passphrase
  • Loading branch information
dominik-cnx authored Jun 8, 2023
2 parents 13c8e67 + f688ff9 commit 4d6502b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ jobs:
uses: joschi/setup-jdk@v2
with:
java-version: '8'
server-id: sonatype-nexus-staging # Value of the distributionManagement/repository/id field of the pom.xml
server-username: CI_DEPLOY_USERNAME # env variable for username in deploy
server-password: CI_DEPLOY_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: CI_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Release
if: ${{ !contains(github.event.head_commit.message, '[maven-release-plugin]') }}
run: |
echo "Preparing release ${RELEASE_VERSION}..."
mvn --settings settings.xml -B release:prepare -Pdo-release -DreleaseVersion=${RELEASE_VERSION} -DdevelopmentVersion=${DEVELOP_VERSION}
mvn --settings settings.xml release:perform -Pdo-release
mvn -B release:prepare -Pdo-release -DreleaseVersion=${RELEASE_VERSION} -DdevelopmentVersion=${DEVELOP_VERSION}
mvn release:perform -Pdo-release
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
CI_GPG_PASSPHRASE: ${{ secrets.CI_GPG_PASSPHRASE }}
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@
<configuration>
<homedir>${session.executionRootDirectory}</homedir>
<keyname>230584D7</keyname>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 4d6502b

Please sign in to comment.