Skip to content

feat: sign release checksums in the release workflow - #2112

Merged
TerryHowe merged 2 commits into
oras-project:mainfrom
TerryHowe:feat/automate-release-signing
Jul 14, 2026
Merged

TerryHowe merged 2 commits into
oras-project:mainfrom
TerryHowe:feat/automate-release-signing

Conversation

@TerryHowe

Copy link
Copy Markdown
Member

What

Sign the release checksums.txt automatically in the release workflow so the .asc signature file is always published.

Why

The oras_<version>_checksums.txt.asc signature has been produced by a manual, out-of-band maintainer step each release. That step was missed for v1.3.3, so the signature file was absent from the release assets and consumers' GPG-based verification pipelines broke (#2111). The .asc for v1.3.3 has since been added by hand; this PR prevents a recurrence by automating it.

Changes

  • .goreleaser.yml — enable a scoped signs block (artifacts: checksum) that produces ${artifact}.asc using a dedicated ORAS Project Release Signing key via loopback pinentry.
  • .github/workflows/release-github.yml — import the signing key from the GPG_PRIVATE_KEY secret and pass GPG_PASSPHRASE to goreleaser.
  • KEYS — add the new project signing public key (C6FC42F0DE84A345FAADB742F44418110791EF37) and document how to verify a release.

New signing key

This introduces a dedicated project signing key rather than continuing to sign with an individual maintainer's personal key. The new public key is added to KEYS. Both the old and new keys are listed, so this does not invalidate signatures on prior releases — but anyone pinning a specific maintainer key for verification should add the new one.

Required before this can be used

Two repository secrets must be configured on oras-project/oras before the next tagged release:

  • GPG_PRIVATE_KEY — ASCII-armored private key for the signing key above
  • GPG_PASSPHRASE — its passphrase

Verifying a release (after this lands)

gpg --import KEYS
gpg --verify oras_<version>_checksums.txt.asc oras_<version>_checksums.txt

Relates to #2111, #2006.

The checksums.txt.asc signature has been produced manually per release,
which meant it was missed for v1.3.3 (see oras-project#2111). Enable goreleaser's
signing so the checksums file is signed automatically as part of the
release workflow.

- .goreleaser.yml: enable a scoped signs block (artifacts: checksum)
  producing ${artifact}.asc with a dedicated project signing key via
  loopback pinentry.
- release-github.yml: import the signing key from the GPG_PRIVATE_KEY
  secret and pass GPG_PASSPHRASE to goreleaser.
- KEYS: add the 'ORAS Project Release Signing' public key and document
  how to verify a release.

Requires the GPG_PRIVATE_KEY and GPG_PASSPHRASE repository secrets to be
configured. Relates to oras-project#2006.

Signed-off-by: Terry Howe <[email protected]>

@sabre1041 sabre1041 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Restore per-archive .asc signatures that were present through v1.3.2.
The signs block was scoped to 'checksum', so v1.3.3 only produced
oras_1.3.3_checksums.txt.asc and no per-.tar.gz/.zip signatures.
Widen the scope to 'all' so every archive (and SBOM) is signed again.

Fixes oras-project#2113

Signed-off-by: Terry Howe <[email protected]>
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.26%. Comparing base (00c0795) to head (97631b7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2112      +/-   ##
==========================================
- Coverage   87.33%   87.26%   -0.08%     
==========================================
  Files         138      138              
  Lines        5488     5488              
==========================================
- Hits         4793     4789       -4     
- Misses        415      419       +4     
  Partials      280      280              

☔ 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.

@TerryHowe
TerryHowe merged commit 85da141 into oras-project:main Jul 14, 2026
9 checks passed
@TerryHowe
TerryHowe deleted the feat/automate-release-signing branch July 14, 2026 20:50
@TerryHowe TerryHowe mentioned this pull request Jul 14, 2026
1 task
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