Skip to content

fix(release): sign checksums with explicit GPG key in isolated keyring - #958

Merged
cdalar merged 3 commits into
mainfrom
fix/gpg-signing-isolated-keyring
Jul 8, 2026
Merged

cdalar merged 3 commits into
mainfrom
fix/gpg-signing-isolated-keyring

Conversation

@cdalar

@cdalar cdalar commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Release signing was failing with gpg: no default secret key: No public key because the self-hosted release runner is persistent, not ephemeral — the shared ~/.gnupg default keyring could end up without an unambiguous default signing key by the time GoReleaser ran.
  • Import the GPG key into a job-scoped $RUNNER_TEMP/gnupg instead of the shared homedir, and have GoReleaser sign with the imported key's fingerprint explicitly (-u {{ .Env.GPG_FINGERPRINT }}) rather than relying on gpg's default-key guess.

Test plan

  • goreleaser check validates the updated .goreleaser.yml
  • Dry-run via goreleaser-self-hosted-test.yml (workflow_dispatch against an existing tag) to confirm signing succeeds end-to-end before it hits a real tag push

cdalar added 2 commits July 8, 2026 10:34
The self-hosted release runner is persistent (not ephemeral), so the
shared ~/.gnupg default keyring can end up in a state where gpg can't
resolve an unambiguous default signing key, failing with
"no default secret key: No public key". Import the key into a
job-scoped GNUPGHOME and have goreleaser sign with the imported key's
fingerprint explicitly instead of relying on gpg's default-key guess.
echo "$GNUPGHOME" >> "$GITHUB_ENV" wrote just the value with no key,
which GitHub's env-file parser rejects ("Invalid format"). Test run
against v0.1.30 caught this before it could hit a real release.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e2d1926b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/goreleaser.yml Resolved
@codecov

codecov Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.21%. Comparing base (5dbb06e) to head (564ac7a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #958   +/-   ##
=======================================
  Coverage   24.21%   24.21%           
=======================================
  Files          44       44           
  Lines        4440     4440           
=======================================
  Hits         1075     1075           
  Misses       3231     3231           
  Partials      134      134           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

GOCACHE/GOMODCACHE already persist on this runner's disk between
runs since it's a long-lived machine, not ephemeral. Uploading/
downloading GitHub's remote Actions cache on top of that just adds
several minutes of upload time for a multi-GB cache with no benefit.
@cdalar
cdalar merged commit 79f3031 into main Jul 8, 2026
13 checks passed
@cdalar
cdalar deleted the fix/gpg-signing-isolated-keyring branch July 8, 2026 08:58
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.

1 participant

⌂ 换网址