Add the release tooling (Gitea + AUR + Nostr) #7

Merged
raucao merged 3 commits from dev/releases into main 2026-11-29 20:35:07 +00:00
Owner

Adds the release tooling for the 1.0 beta. It touches no version and cuts no tag — the first release is a separate, deliberate run of the script after this merges.

The release is signed in two places, so build-aux/release.sh has three stages:

  • prepare <version> — build host: bumps meson.build/Cargo.toml/Cargo.lock, regenerates the AppStream release entry from CHANGELOG.md, validates, builds and tests, commits the result SSH-signed, runs meson dist, and pushes main.
  • sign <version> — laptop: GPG-signs the tarball (detached .asc) and the annotated tag, and pushes the tag.
  • publish <version> — laptop: creates the Gitea release (gt release create), updates the AUR, and publishes the Nostr release (ngit release publish).

The release (tag + tarball) is GPG-signed; the release commit is SSH-signed. That split exists because the GPG key stays on a laptop while the build runs on the build host — the GPG key never touches the build host, and the two formats are set per git command (-c gpg.format=ssh|openpgp), so neither depends on a machine's global config. Only dist/ travels between the machines; sign pulls it over SSH via REGENT_BUILD_HOST.

Steps are skippable: --draft, --no-push, --no-aur, --no-nostr, --no-pull.

One version, three dialects, derived in one place, because both AppStream and pacman sort a -/.-separated pre-release above the final release: 1.0.0-beta.1 (tag/Cargo/meson/tarball/changelog), 1.0.0~beta.1 (metainfo, type="development"), 1.0.0beta1 (AUR pkgver).

Also: CHANGELOG.md becomes the single source of release notes; build-aux/gen-metainfo-releases.py generates the metainfo <releases> block from it; the AUR recipes land in build-aux/aur/{regent,regent-git} (the stable recipe gains the .asc in source and validpgpkeys pinned to the signing fingerprint); the working-tree package is renamed regent-dev; .ngit/release.yaml publishes the same tarball to Blossom under NIP-82; the release docs move to doc/dev/releasing.md.

Verified: meson compile, cargo test (114 passed, 7 ignored), appstreamcli validate --no-net, desktop-file-validate, glib-compile-schemas, makepkg --printsrcinfo on all three recipes, a throwaway meson dist, and the release script's argument/preflight behaviour. Not yet exercised: the GPG signing and the publish steps, which need the keys, the AUR/ngit credentials and a real tag.

Refs #2

Adds the release tooling for the 1.0 beta. It touches no version and cuts no tag — the first release is a separate, deliberate run of the script after this merges. The release is signed in two places, so `build-aux/release.sh` has three stages: - `prepare <version>` — build host: bumps `meson.build`/`Cargo.toml`/`Cargo.lock`, regenerates the AppStream release entry from `CHANGELOG.md`, validates, builds and tests, commits the result **SSH-signed**, runs `meson dist`, and pushes `main`. - `sign <version>` — laptop: **GPG**-signs the tarball (detached `.asc`) and the annotated tag, and pushes the tag. - `publish <version>` — laptop: creates the Gitea release (`gt release create`), updates the AUR, and publishes the Nostr release (`ngit release publish`). The release (tag + tarball) is GPG-signed; the release commit is SSH-signed. That split exists because the GPG key stays on a laptop while the build runs on the build host — the GPG key never touches the build host, and the two formats are set per git command (`-c gpg.format=ssh|openpgp`), so neither depends on a machine's global config. Only `dist/` travels between the machines; `sign` pulls it over SSH via `REGENT_BUILD_HOST`. Steps are skippable: `--draft`, `--no-push`, `--no-aur`, `--no-nostr`, `--no-pull`. One version, three dialects, derived in one place, because both AppStream and pacman sort a `-`/`.`-separated pre-release *above* the final release: `1.0.0-beta.1` (tag/Cargo/meson/tarball/changelog), `1.0.0~beta.1` (metainfo, `type="development"`), `1.0.0beta1` (AUR `pkgver`). Also: `CHANGELOG.md` becomes the single source of release notes; `build-aux/gen-metainfo-releases.py` generates the metainfo `<releases>` block from it; the AUR recipes land in `build-aux/aur/{regent,regent-git}` (the stable recipe gains the `.asc` in `source` and `validpgpkeys` pinned to the signing fingerprint); the working-tree package is renamed `regent-dev`; `.ngit/release.yaml` publishes the same tarball to Blossom under NIP-82; the release docs move to `doc/dev/releasing.md`. Verified: `meson compile`, `cargo test` (114 passed, 7 ignored), `appstreamcli validate --no-net`, `desktop-file-validate`, `glib-compile-schemas`, `makepkg --printsrcinfo` on all three recipes, a throwaway `meson dist`, and the release script's argument/preflight behaviour. Not yet exercised: the GPG signing and the publish steps, which need the keys, the AUR/ngit credentials and a real tag. Refs #2
raucao added 1 commit 2026-11-29 19:57:16 +00:00
build-aux/release.sh cuts a release from main: it bumps the version in
meson.build/Cargo.toml/Cargo.lock, generates the AppStream release entry from
CHANGELOG.md, builds and signs the distribution tarball, tags it, and publishes
to Gitea (gt release create), the AUR, and Nostr (ngit release publish). Every
outward-facing step is skippable (--no-push/--no-release/--no-aur/--no-nostr),
so a build can be prepared and reviewed before it goes anywhere.

Signing is SSH-only (git's gpg.format=ssh): an annotated tag plus an
ssh-keygen -Y sign detached signature over the tarball. That lets the key stay
on a laptop — run the script under ssh -A and the forwarded agent signs, so the
key material never lands on the build host.

Also:
- CHANGELOG.md: the single source of release notes (Keep a Changelog).
- build-aux/gen-metainfo-releases.py: generates the metainfo <releases> block
  from it, translating the version dialect (1.0.0-beta.1 -> 1.0.0~beta.1, with
  type=development) and exposing --notes for the release notes text.
- build-aux/aur/{regent,regent-git}: the AUR recipes (release tarball and VCS).
- build-aux/regent-dev: the working-tree package, renamed from regent-git to
  make room for the AUR regent-git; deploy-dev.sh --pkg builds this one.
- .ngit/release.yaml: the NIP-82 release manifest (Blossom mirror at
  blossom.kosmos.org), replacing the hand-rolled NIP-94/30063/32267 plan.
- Docs: README (install + verify), doc/dev/development.md (Releasing),
  AGENTS.md (Releases).

This adds tooling only: it cuts no tag and publishes nothing.
raucao added the dev environmentdistribution labels 2026-11-29 20:01:42 +00:00
raucao added 1 commit 2026-11-29 20:09:00 +00:00
The release process is a maintainer's job, not part of local development, so it
gets its own document. development.md now just points at it (and the README's
documentation list gains an entry).
raucao added 1 commit 2026-11-29 20:28:54 +00:00
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.
raucao merged commit 12b78c848c into main 2026-11-29 20:35:07 +00:00
Sign in to join this conversation.