Repository navigation
Point setup-java v6 at MAVEN_GPG_PASSPHRASE for GPG signing - #26
Merged
Merged
Conversation
setup-java v6 sets maven-gpg-plugin's gpg.passphraseEnvName to the gpg-passphrase-env-var input, which defaults to GPG_PASSPHRASE. These workflows provide the passphrase as MAVEN_GPG_PASSPHRASE, so signing found no passphrase and failed with "gpg: signing failed: No pinentry". release.yml used the deprecated gpg-passphrase alias; switch it to the new input too.
There was a problem hiding this comment.
🟢 Approval recommended
Both workflows now correctly align setup-java v6 with the passphrase variable exported during publishing.
0 open findings
What changed in this PR
Aligns GPG passphrase handling with actions/setup-java@v6 to restore non-interactive Maven release signing.
Changes:
- Uses the supported
gpg-passphrase-env-varinput. - Points both release workflows to
MAVEN_GPG_PASSPHRASE.
| File | Description |
|---|---|
.github/workflows/release.yml |
Updates the existing passphrase input name. |
.github/workflows/jreleaser.yml |
Enables the correct passphrase environment variable mapping. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every MorphiaOrg/morphia Release run has failed since #25 moved
jreleaser.ymltoactions/setup-java@v6. The latest is https://github.com/MorphiaOrg/morphia/actions/runs/38106786772:setup-java v6 (actions/setup-java#1123) tells
maven-gpg-pluginto read the passphrase from the environment variable named by thegpg-passphrase-env-varinput. That defaults toGPG_PASSPHRASE.jreleaser.ymlexports the passphrase asMAVEN_GPG_PASSPHRASEand never setsGPG_PASSPHRASE, so the plugin found no passphrase and gpg tried to prompt for one. Under v5 the plugin fell back toMAVEN_GPG_PASSPHRASEitself.Changes
jreleaser.yml: replaces the commented-outgpg-passphraseline withgpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE. That is the plugin's default name, so setup-java writes no override.release.yml: already worked through the deprecatedgpg-passphrasealias; it now uses the new input name.Checked with actionlint. Once this is merged, re-running a failed morphia Release job picks it up, because callers use
jreleaser.yml@master.