Skip to content

👷 Automate releases with Release Drafter and reproducible builds - #1421

Merged
0x46616c6b merged 3 commits into
mainfrom
feature/reproducible-release
Nov 3, 2026
Merged

0x46616c6b merged 3 commits into
mainfrom
feature/reproducible-release

Conversation

@0x46616c6b

Copy link
Copy Markdown
Member

Goal

Automate the release process as far as possible without handing our GPG signing key to GitHub, and without signing artifacts built by GitHub blindly.

Until now, a maintainer prepared a changelog PR (via the prepare-release skill) and then ran bin/github-release.sh locally to build, sign and upload the release. With this change, GitHub drafts and builds every release, and the maintainer only verifies, signs and publishes it.

How it works

  1. Release Drafter keeps a release draft up to date on every push to main. The autolabeler labels pull requests by the gitmoji in their title. The labels decide the section in the release notes (Features and Improvements, Security, Bug Fixes, Technical Changes, Maintenance) and the next version (breaking for major, enhancement for minor, patch otherwise).
  2. A follow-up job builds the release tarballs at the exact draft commit and attaches them, together with the checksums and a build-info.json, to the draft. It uses only GITHUB_TOKEN, with no other secrets.
  3. A maintainer runs bin/release.sh. It rebuilds the tarballs locally from the same commit and compares the checksums with the draft. Only if they are identical does it sign the checksums, create a signed tag, upload the signatures and publish the release. --dry-run only rebuilds and compares.

Reproducible builds

To make step 3 possible, make release-container builds the tarballs in a toolchain container pinned by image digest (docker/release/Dockerfile). The tarballs are created with normalized metadata: sorted entries, a fixed mtime from the commit, fixed owner and permissions, and gzip without a timestamp. Dependabot keeps the pinned images up to date.

Other changes

  • CHANGELOG.md is frozen at 6.12.0 and points to GitHub Releases. The prepare-release skill is removed.
  • The release docs describe the new flow, the label mapping and how to debug a checksum mismatch.
  • New label breaking (already created) for major releases.

Notes

  • The Release Drafter workflow and bin/release.sh can only run for real after merge. The first release should start with bin/release.sh --dry-run.
  • UPGRADE.md stays manual and should be updated in the pull request that introduces the change.

🤖 Generated with Claude Code

0x46616c6b and others added 3 commits November 3, 2026 15:12
Split the release build into source/compile/package targets and add
`make release-container`, which compiles and packages inside a toolchain
container pinned by image digest. Tarballs get normalized metadata
(sorted entries, fixed mtime/owner/mode, gzip without timestamp), and
VERSION can be set before a tag exists.

This allows maintainers to rebuild a CI-built release bit-for-bit
before signing it. Repeated builds and amd64 vs. arm64 builds produce
identical checksums.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release Drafter keeps a draft release up to date on every push to main.
Pull requests are labeled by the gitmoji in their title and grouped into
Features and Improvements, Security, Bug Fixes, Technical Changes and
Maintenance; the next version is resolved from the labels (`breaking`
for major, `enhancement` for minor, patch otherwise).

A follow-up job builds the release tarballs with `make release-container`
at the exact commit and attaches them, the checksums and a build-info.json
to the draft. No secrets are involved; signing and publishing stay with
the maintainers, who rebuild the tarballs locally first.

Dependabot keeps the pinned release toolchain images up to date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace bin/github-release.sh with bin/release.sh. Instead of building
and uploading a release from scratch, it takes the release draft built
by GitHub Actions, rebuilds the tarballs locally from the same commit in
the pinned release container and only signs and publishes the release if
all checksums are identical. The GPG key never leaves the maintainer's
machine and GitHub's build is never signed unverified.

Release notes now come from Release Drafter: CHANGELOG.md points to
GitHub Releases from the next release on, and the prepare-release skill
is removed. The release docs describe the new flow, the label scheme and
how to debug a checksum mismatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0x46616c6b 0x46616c6b added enhancement New feature or request documentation Software is more than code github_actions Pull requests that update Github_actions code labels Nov 3, 2026
@0x46616c6b
0x46616c6b marked this pull request as ready for review November 3, 2026 16:52
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@0x46616c6b
0x46616c6b merged commit 8636736 into main Nov 3, 2026
10 checks passed
@0x46616c6b
0x46616c6b deleted the feature/reproducible-release branch November 3, 2026 18:35
@0x46616c6b 0x46616c6b removed the enhancement New feature or request label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Software is more than code github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant