Skip to content

Point setup-java v6 at MAVEN_GPG_PASSPHRASE for GPG signing - #26

Merged
evanchooly merged 1 commit into
masterfrom
gpg-passphrase-env-var
Oct 11, 2026
Merged

evanchooly merged 1 commit into
masterfrom
gpg-passphrase-env-var

Conversation

@evanchooly

Copy link
Copy Markdown
Owner

Why

Every MorphiaOrg/morphia Release run has failed since #25 moved jreleaser.yml to actions/setup-java@v6. The latest is https://github.com/MorphiaOrg/morphia/actions/runs/38106786772:

[INFO] Signer 'gpg' is signing 2 files with key default
[INFO] [stdout] gpg: signing failed: No pinentry

setup-java v6 (actions/setup-java#1123) tells maven-gpg-plugin to read the passphrase from the environment variable named by the gpg-passphrase-env-var input. That defaults to GPG_PASSPHRASE. jreleaser.yml exports the passphrase as MAVEN_GPG_PASSPHRASE and never sets GPG_PASSPHRASE, so the plugin found no passphrase and gpg tried to prompt for one. Under v5 the plugin fell back to MAVEN_GPG_PASSPHRASE itself.

Changes

  • jreleaser.yml: replaces the commented-out gpg-passphrase line with gpg-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 deprecated gpg-passphrase alias; 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.

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.
Copilot AI balanced review requested due to automatic review settings October 11, 2026 03:28
@evanchooly
evanchooly merged commit 52882ac into master Oct 11, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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-var input.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants