Move the release docs into doc/dev/releasing.md

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).
This commit is contained in:
raucao committed 2026-11-30 00:08:54 +04:00
1 parent 07a7976711
commit ba3d07d7d7
3 files changed
+99 -53

No files matched your search

+2
View File
@@ -59,6 +59,8 @@ issues and pull requests are accepted on either:
- [Development](doc/dev/development.md) — prerequisites, building, running, tests
and deployment
- [Releasing](doc/dev/releasing.md) — cutting a release: build, sign, tag, and
publish to Gitea, the AUR and Nostr
- [Advanced usage](doc/advanced.md) — running the signer without a window and
pairing from the CLI
+2 -53
View File
@@ -4,7 +4,8 @@ How to build Regent, run it from a build tree, and test it.
> Scope: local setup, building, running, tests and deployment. For running the
> signer unattended and pairing a client from the command line, see
> [Advanced usage](../advanced.md).
> [Advanced usage](../advanced.md); for cutting a release, see
> [Releasing](releasing.md).
## Prerequisites
@@ -152,58 +153,6 @@ build-aux/deploy-dev.sh --versions # GTK/libadwaita this host builds against
build-aux/deploy-dev.sh --help
```
## Releasing
Releases are cut from `main` with `build-aux/release.sh`, which bumps the
version, builds and signs the distribution tarball, tags it, and publishes it to
Gitea, the AUR and Nostr:
```sh
build-aux/release.sh 1.0.0-beta.1
```
Signing is **SSH-only** (git's `gpg.format=ssh`): the annotated tag, and a
detached signature over the tarball, are made with an SSH key. That lets the key
stay on your laptop — forward your agent and run the script on the build host:
```sh
ssh -A user@build-host
```
The key comes from `REGENT_SIGNING_KEY`, else `git config user.signingkey`, else
`~/.ssh/id_ed25519.pub`; the script proves it can sign before it writes
anything. The publish steps use `gt` (Gitea), `makepkg` (AUR) and `ngit`
(Nostr), so those credentials live where the script runs.
The run is linear and stops at the first failure. Every outward-facing step can
be turned off, so a build can be prepared and reviewed before it is published
anywhere:
```sh
build-aux/release.sh 1.0.0-beta.1 \
--no-push --no-release --no-aur --no-nostr # build, commit, tag and sign only
```
- `--draft` — open the Gitea release as a draft instead of publishing it.
- `--no-push`, `--no-release`, `--no-aur`, `--no-nostr` — skip that step.
- `REGENT_MESON_DIST_ARGS=--no-tests` — skip `meson dist`'s build-and-test of
the tarball (it doubles the build time; the pre-flight build already ran).
Release notes live in `CHANGELOG.md` and nowhere else. The AppStream release
entries are generated from it into the metainfo by
`build-aux/gen-metainfo-releases.py` (which `release.sh` runs); do not edit the
`releases:begin`/`releases:end` block by hand.
One version, three dialects, all derived from the one you pass — because both
AppStream and pacman order a `-`/`.`-separated pre-release *above* the final
release:
| Where | `1.0.0-beta.1` |
| --- | --- |
| tag, Cargo, meson, tarball, changelog | `1.0.0-beta.1` |
| AppStream metainfo | `1.0.0~beta.1` |
| AUR `pkgver` | `1.0.0beta1` |
## Further reading
- [GTK 4 documentation](https://docs.gtk.org/gtk4/)
+95
View File
@@ -0,0 +1,95 @@
# Releasing
How to cut a Regent release: build, sign, tag, and publish it to Gitea, the AUR
and Nostr.
> Scope: maintainers cutting a release. For local setup, building, running and
> testing, see [Development](development.md).
Releases are cut from `main` with one script:
```sh
build-aux/release.sh 1.0.0-beta.1
```
It bumps the version, builds and signs the distribution tarball, tags it, and
publishes it. The run is linear and stops at the first failure.
## Signing
Signing is **SSH-only** (git's `gpg.format=ssh`) — no GPG:
- the annotated git tag is signed (`git tag -s`),
- a detached signature over the tarball is made with `ssh-keygen -Y sign`, and a
matching `allowed_signers` file is attached to the release.
That lets the key stay on your laptop: forward your agent and run the script on
the build host, where the compile happens.
```sh
ssh -A user@build-host
```
The key comes from `REGENT_SIGNING_KEY`, else `git config user.signingkey`, else
`~/.ssh/id_ed25519.pub`. The script proves it can sign before it writes
anything, so a missing key or agent fails up front.
The commit is signed too, which is why the commit and its tag are cut *before*
`meson dist`: the tarball is built from that commit, and re-signing the commit
afterwards would change its hash and break the release's provenance.
## 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; the script renames that heading to the
version and date. The AppStream release entries in the metainfo are generated
from the same file by `build-aux/gen-metainfo-releases.py` — do not edit the
`releases:begin`/`releases:end` block by hand.
## What a release publishes
- **Gitea** (canonical): a release for the tag, carrying the source tarball, its
`.sha256sum`, its `.sig`, `allowed_signers`, and the AUR `PKGBUILD`; the notes
come from `CHANGELOG.md`. Pre-releases are marked as such.
- **AUR**: `regent` (the released tarball) and `regent-git` (tracks `main`).
- **Nostr** (mirror): `.ngit/release.yaml` publishes the same files to Blossom
under NIP-82, signed by the fixed release identity.
## Previewing without publishing
Every outward-facing step can be turned off, so a build can be prepared and
reviewed before it goes anywhere:
```sh
build-aux/release.sh 1.0.0-beta.1 \
--no-push --no-release --no-aur --no-nostr # build, commit, tag and sign only
```
- `--draft` — open the Gitea release as a draft instead of publishing it.
- `--no-push`, `--no-release`, `--no-aur`, `--no-nostr` — skip that step.
- `REGENT_MESON_DIST_ARGS=--no-tests` — skip `meson dist`'s build-and-test of the
tarball (it doubles the build time; the pre-flight build already ran).
Undo a preview run with `git reset --soft HEAD~1 && git tag -d vX.Y.Z`.
## One-time setup
- An SSH signing key (`git config user.signingkey`), available to the agent.
- Gitea: protect `v*` tags so only maintainers can cut release tags, and run
`gt auth login` where the script runs.
- AUR: the `regent` and `regent-git` packages created, with the AUR SSH key where
the script runs.
- Nostr: the ngit signer for the repository's npub, which must stay the same for
every release.