Corrects the signing scheme. The release itself — the annotated tag and a detached signature over the tarball — is GPG-signed; the release commit is SSH-signed. Because the GPG key lives on a laptop and the build runs on the build host, the single script becomes three stages split across two machines: prepare <ver> build host: bump, build, meson dist, SSH-signed commit sign <ver> laptop: GPG-sign the tarball and the tag publish <ver> laptop: Gitea release, AUR, Nostr The GPG key never touches the build host, and only dist/ travels: the laptop pulls it over SSH. The two signing formats are set per git command (-c gpg.format=ssh|openpgp), so neither depends on a machine's global config. - release.sh: prepare/sign/publish subcommands; SSH commit, GPG tag + detached tarball signature; REGENT_SSH_SIGNING_KEY / REGENT_GPG_KEY; a release.env handoff that pins the tagged commit; optional dist/ pull. - AUR regent: the .asc in source and validpgpkeys pinned to _fingerprint. - .ngit/release.yaml: the .asc and an exported public key, replacing the SSH .sig and allowed_signers. - README, doc/dev/releasing.md, AGENTS.md updated for the split.
4.0 KiB
Releasing
How to cut a Regent release: build it on the build host, sign it on the machine that holds the GPG key, then publish it to Gitea, the AUR and Nostr.
Scope: maintainers cutting a release. For local setup, building, running and testing, see Development.
Who signs what, and where
The two keys live on different machines, so a release is three stages:
| Stage | Machine | Signs with |
|---|---|---|
prepare |
build host | SSH — the release commit |
sign |
laptop | GPG — the tag and the tarball |
publish |
laptop | — |
The GPG key never touches the build host. The release commit is SSH-signed (not GPG); the tag and the detached tarball signature are GPG.
Cutting a release
On the build host:
build-aux/release.sh prepare 1.0.0-beta.1
On the machine with the GPG key:
build-aux/release.sh sign 1.0.0-beta.1
build-aux/release.sh publish 1.0.0-beta.1
sign pulls dist/ from the build host over SSH when it is not there yet, so set
REGENT_BUILD_HOST there. Each stage is linear and stops at the first failure.
prepare (build host)
Checks that you are on a clean main in sync with origin, that the tag is
free, and that the version is newer than the current one; then it bumps the
version in meson.build/Cargo.toml/Cargo.lock, closes the [Unreleased]
changelog section, regenerates the metainfo, validates, builds and tests, and
commits the result SSH-signed (the key comes from REGENT_SSH_SIGNING_KEY,
else git config user.signingkey, else ~/.ssh/id_ed25519.pub). It then runs
meson dist and leaves the tarball, the checksum, the release notes and a
release.env handoff in dist/, and pushes main.
sign (laptop)
Verifies the tarball against release.env and sha256sum, then:
gpg --armor --detach-sign→dist/regent-<version>.tar.xz.asc,- exports the public key →
dist/regent-signing-key.asc, git tag -s(GPG) and pushes the tag.
The key comes from REGENT_GPG_KEY, else the first secret key in the keyring.
publish (laptop)
Creates the Gitea release (the tarball, its .sha256sum, its .asc, the public
key, the PKGBUILD and the notes; pre-releases are marked as such), updates the
AUR recipes — regent gains the real sha256, the .asc in source and the
fingerprint in validpgpkeys — publishes the Nostr release, and commits the
in-repo AUR recipe snapshot.
One version, three dialects
The version you pass is translated for the three ecosystems in release.sh,
because AppStream and pacman sort a -/.-separated pre-release above the
final release:
| Where | 1.0.0-beta.1 |
|---|---|
git tag, Cargo.toml, meson.build, tarball, CHANGELOG.md |
1.0.0-beta.1 |
| AppStream metainfo | 1.0.0~beta.1 (with type="development") |
AUR pkgver |
1.0.0beta1 |
Release notes
Release notes live in CHANGELOG.md and nowhere else. Write the new section
under ## [Unreleased] before releasing; prepare renames that heading to the
version and date. The AppStream release entries are generated from the same file
by build-aux/gen-metainfo-releases.py — do not edit the
releases:begin/releases:end block by hand.
Skipping steps
--draft(publish) — open the Gitea release as a draft.--no-push(prepare,sign,publish) — do not push.--no-aur,--no-nostr(publish) — skip that destination.--no-pull(sign) — fail instead of pullingdist/from the build host.REGENT_MESON_DIST_ARGS=--no-tests(prepare) — skipmeson dist's build-and-test of the tarball.
One-time setup
- A GPG key for signing tags and tarballs, on the laptop; publish its fingerprint.
- An SSH key for signing the release commit, on the build host.
- Gitea: protect
v*tags;gt auth loginwherepublishruns. - AUR: the
regentandregent-gitpackages, with the AUR SSH key wherepublishruns. - Nostr: the ngit signer for the repository's npub, which must stay the same for every release.