Releasing Airframe
A release is a vX.Y.Z tag on main. Pushing the tag runs
.github/workflows/release.yml, which
verifies, builds, checksums and publishes everything; nobody uploads anything
by hand.
The pieces
Section titled “The pieces”| Piece | What it does |
|---|---|
release-drafter.yml + config |
On every push to main, keeps one draft release named after the next version (vX.Y.Z) with notes from the merged PRs, grouped by their Conventional Commit type. On PRs it labels them from their title. |
.goreleaser.yaml |
GoReleaser v2.20.3: builds cmd/airframe for darwin, linux and windows on amd64 and arm64 (CGO_ENABLED=0, version injected into internal/version.Version), archives them as airframe_<version>_<os>_<arch>.tar.gz (.zip on windows) and writes checksums.txt (SHA-256); it also attaches the VS Code extension, airframe-vscode-<version>.vsix and airframe-vscode.sha256, and the desktop app’s unsigned bundles, Airframe_<version>_aarch64.dmg, Airframe_<version>_x64-setup.exe, Airframe_<version>_amd64.AppImage and airframe-desktop.sha256 (release.extra_files, globs that fail the release when they match nothing). Its own changelog is off. |
release.yml |
On a vX.Y.Z tag push. Job verify (read-only token, no persisted credentials) checks the tag is on main and runs vet, gofmt and the tests. Job vscode-package (read-only token too) builds the VS Code extension with make vscode-package VERSION=<version>, checks it with scripts/check-vsix.sh and hands the .vsix and its SHA-256 on as an artifact, so the third-party JavaScript a build runs never runs beside the write token. Job desktop-bundle (read-only token, one runner each for macOS, Windows and Linux) builds the desktop app’s bundle for that OS with `make desktop-bundle BUNDLES=dmg |
site.yml |
Builds the website (website/) and checks it against the binary and the repository: ci.yml’s site job, when a change touches what the site is built from. make site runs the same locally. |
publish.yml |
Builds the website for a release and moves the live branch, which Cloudflare Pages serves. See Publishing the website. |
action.yml |
The GitHub Action. It downloads a release’s archive and checksums.txt, verifies the SHA-256 and only then runs the binary. |
action-test.yml |
On every PR, on Linux, macOS and Windows. See What the action test covers. |
action-release-test.yml |
Runs the action (uses: ./) end to end against a real published release on Linux, macOS and Windows: download, checksum, lint, build --check, fmt --check and the path output. On PRs that touch the action, and by hand after every release. |
Floating tags
Section titled “Floating tags”v<major> and v<major>.<minor> follow the latest stable release: v0 and
v0.1 point at v0.1.0 until v0.1.1 moves both. Floating tags never move
backward: v<major> moves only when the new tag is the highest stable
v<major>.*.*, and v<major>.<minor> only when it is the highest stable
v<major>.<minor>.*, so a v0.1.5 patch released after v0.2.0 moves v0.1
but leaves v0 on v0.2.0. Throughout 0.x the major tag is v0; at 1.0.0 it
becomes v1. Users write uses: c65llc/airframe@v0 with version: v0.13.0.
A pre-release tag (v0.2.0-rc.1, anything with a -) is published as a
GitHub pre-release and moves no floating tag.
Cutting a release
Section titled “Cutting a release”A maintainer with push access to c65llc/airframe does this; tags and
releases are cut only with the repository owner’s explicit approval.
-
Check the draft. Open the repository’s Releases page. The draft at the top is named after the version release-drafter resolved from the PR labels (
featurebumps the minor,breaking/majorthe major, anything else the patch). To pick a different version, edit the draft’s name (the tag field is irrelevant; GoReleaser matches the draft by name) to the exactvX.Y.Zyou will tag, and edit the notes if needed. Do not publish the draft: publishing it in the UI would create the tag without themaincheck and before the assets exist. -
Check
mainis green.cipassed on the commit you are releasing. -
Tag and push from an up-to-date
main:Terminal window git switch main && git pull --ff-onlygit tag -a v0.1.0 -m "v0.1.0"git push origin v0.1.0 -
Watch
Release. When it finishes, the releasev0.1.0is published with the draft’s notes, six archives,checksums.txt,airframe-vscode-0.1.0.vsixandairframe-vscode.sha256, the three desktop bundles (Airframe_0.1.0_aarch64.dmg,Airframe_0.1.0_x64-setup.exe,Airframe_0.1.0_amd64.AppImage) andairframe-desktop.sha256, andv0andv0.1point at the tagged commit:Terminal window gh release view v0.1.0 --json assets --jq '.assets[].name'git fetch --tags --force && git rev-parse v0.1.0^{commit} v0^{commit} v0.1^{commit} -
Run
Action release test(Actions → Action release test → Run workflow, versionvX.Y.Z): it must pass on all three operating systems. It is the only check that downloads the published assets through the action itself. -
Verify one archive by hand against
checksums.txt:Terminal window gh release download v0.1.0 --pattern 'checksums.txt' --pattern 'airframe_0.1.0_linux_amd64.tar.gz'grep ' airframe_0.1.0_linux_amd64.tar.gz$' checksums.txtshasum -a 256 airframe_0.1.0_linux_amd64.tar.gz # the same digest
If the draft’s name did not match the tag, GoReleaser creates a new release with an empty body and the draft is left behind: paste the draft’s notes into the published release and delete the draft.
A failed release
Section titled “A failed release”- Verification or GoReleaser failed before publishing: fix on
main, delete the tag (git push --delete origin v0.1.0 && git tag -d v0.1.0), and tag the fixed commit. Nothing was published. - Published, but broken: never move or reuse a published version tag; the action’s users pin exact versions and their checksums. Release the fix as the next patch version.
What the action test covers
Section titled “What the action test covers”action-test.yml runs on every PR without needing a release: it runs the
action’s own script text (extracted from action.yml, not a copy) for the
parts that need no release:
- the install step refuses an inexact version (
v0.1,0.1.0, a pre-release, empty) and an unsupported OS or architecture, before any download; - the OS/architecture mapping computes the published archive name
(
airframe_0.1.0_linux_amd64.tar.gz,.zipon windows), checked with acurlshim that records the URL; - the run step, with a GoReleaser snapshot binary on
PATH, lintstestdata/minimalwithlint --format githuband exits 0, and refuses a multi-lineargs; build --checkexits 0 on a clean copy oftestdata/minimaland exits 1 after a token in a temp copy is changed.
The full download path (fetch, checksum verification, extraction) is
covered by action-release-test.yml, which runs the action against a real
published release.
The action downloads without a token
Section titled “The action downloads without a token”The composite Action’s download is unauthenticated (curl against
github.com/.../releases/download), which works because c65llc/airframe and
its releases are public. If the repository were ever made private again, a
workflow in another repository using uses: c65llc/airframe@v0 would get a 404
on the archive until the action passes a token.
Publishing the website
Section titled “Publishing the website”https://airframe.uijig.com/ is served by the Cloudflare Pages project
airframe, which is connected to this repository. Its production branch is
live, with no build command and the output directory /, so
Cloudflare serves exactly what live holds and builds nothing. It cannot
build the site: the build needs the Go binary and the PWA. GitHub Actions
builds it and pushes it to live, and holds no Cloudflare token.
Edit the homepage copy in its Sagegrouse content entry.
Edit guides and rule pages in their existing source directories under docs/.
During pnpm dev and pnpm build, the website syncs the repository docs and
Sagegrouse validates the homepage and the generated Starlight content before Astro runs.
The website’s token source,
Gantry ruling, and Starboard flow
record the homepage’s entry points. Run make design-check with Gantry and
Starboard on your PATH. After editing a source, regenerate its outputs with
bin/airframe build, gantry generate, or starboard generate from the repository root.
live holds one orphan commit whose tree is the built site
(website/dist) at its root, _headers and 404.html included, plus a
README.md saying the branch is generated.
website/scripts/live-tree.sh assembles
it, and refuses a site without index.html, 404.html, _headers (with its
CSP rendered), the PWA or the rule index, and any .git* path, symlink or
website/ path. Each commit records its version in an Airframe-Version:
trailer. Nobody pushes to live by hand.
A green Publish site (or Release) run means live moved, not that the site
deployed. The deploy’s status is in Cloudflare: Workers & Pages →
airframe → Deployments.
publish.yml has four jobs:
resolve(read-only) decides whether to publish, which commit to build and which version the site shows. It skips, with a notice, a pre-release, a release that is not the newest stable one (av0.11.5patch afterv0.12.0does not take the site back), a dispatch from a branch other thanmain, and anything before the first stable release.buildissite.yml, the same build and checks as CI (site-check, links, the CSP and live-tree tests, Playwright and axe). Only when every check passed does it assemble the live tree and upload it as an artifact.dry-run(read-only) checks that tree aspublishwould and lists it, file by file, without pushing. It runs on a pull request that changespublish.yml,site.ymlorlive-tree.sh, and on a dispatch with dry_run ticked.publish, the only job withcontents: write, checks out nothing and runs no project code. It checks the tree again, then replaceslivewith one orphan commit holding exactly that tree, pushed with the built-inGITHUB_TOKENand--force-with-leaseagainst the head it read. It pushes nothing if the tree is unchanged, refuses to publish a version that is no longer the newest stable tag or to replace alivethat records a newer one, and runs one at a time (publish-live).
What moves live, and nothing else does:
| Event | Builds | Version the site shows |
|---|---|---|
A stable release (release.yml’s site job calls publish.yml; release: published covers a release published any other way) |
the tagged commit | the release tag |
Publish site dispatched from main, tag empty |
main |
the newest stable release tag |
Publish site dispatched from main, tag set |
that release’s commit | that tag |
release.yml calls publish.yml directly because GoReleaser publishes the
release with the GITHUB_TOKEN, and an event the GITHUB_TOKEN raises
starts no workflow.
Publishing by hand
Section titled “Publishing by hand”Actions → Publish site → Run workflow, on main. Leave tag empty
to publish main, or give the newest stable tag to republish that release’s
site, for example after a failed run. Tick dry_run to build and list the
tree without pushing it. Locally, make site builds and checks the site and
lists the tree live would hold.
To take the site back to an earlier build, roll back in Cloudflare (Workers &
Pages → airframe → Deployments → an earlier production deployment →
Rollback), then fix forward with a release. live keeps no history to revert
to, and a dispatch of an older tag is refused by design.
The one-time switch
Section titled “The one-time switch”Until this switch, the Pages project serves main’s buildless site/
directory, and site/ must stay on main untouched. The switch, in the
Cloudflare dashboard, by a human:
- Publish
livefirst: merge the website, then cut the next release (or, after a release exists, run Publish site frommain), and check thatliveexists (git ls-remote origin refs/heads/live) and its root holdsindex.html,404.htmland_headers. No ruleset or branch protection may coverlive, or the bot’s forced push is refused. - Workers & Pages →
airframe→ Settings → Build (Builds & deployments) → Branch control: set the production branch tolive. Set Preview branches to None:mainand pull request branches are not deployable trees. Leave Enable automatic production branch deployments on: it is what deploys each newlivecommit. - In the same settings, Build configuration: Framework preset
None, Build command empty (none), Build output directory
/(or leave it empty). Root directory stays/. - After switching, re-run Publish site from
mainand wait for itslivecommit to go live as production. Pushes tolivemade before the switch were built by Cloudflare as preview deployments under the old configuration; those builds may fail, which is harmless. If the run reports thatlivealready holds this build (an unchanged tree pushes nothing, so nothing deploys), instead use Deployments → Retry deployment on the newestlivedeployment. - Check the site (below).
Note the project’s current settings before step 2. If anything goes wrong,
put them back (production branch main). main no longer holds a
servable site, so the rollback serves nothing useful: fix forward by
re-running Publish site instead.
After a release: check the site
Section titled “After a release: check the site”site=https://airframe.uijig.comfor p in / /start/ /app/ /schema/v1/config.json /rules/ /rules/contrast-below/ /rules/emit-unsupported/; do printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$site$p")" "$p"donecurl -s -o /dev/null -w '%{http_code}\n' "$site/no-such-page/" # 404curl -sI "$site/" | grep -i '^content-security-policy'curl -sI "$site/app/" | grep -i '^content-security-policy'curl -sI "$site/app/core/airframe.wasm" | grep -i '^content-type'- Every page answers
200, a missing one404, and the landing page shows the new version. /has aContent-Security-Policywith hashes inscript-srcand no'unsafe-inline'there;/app/has the site’s policy and the/app/*one (joined into one header, or two), the latter withworker-src 'self'./app/core/airframe.wasmis served asapplication/wasm./schema/v1/*.jsonare byte for byte whatairframe schema <name>prints.
Local dry run
Section titled “Local dry run”go run github.com/goreleaser/goreleaser/v2@v2.20.3 checkgo run github.com/goreleaser/goreleaser/v2@v2.20.3 release --snapshot --clean # writes dist/ (gitignored); publishes nothingdist/airframe_*/airframe versionFuture
Section titled “Future”- Signing and provenance. Releases are verified by SHA-256 only. Signing
checksums.txt(cosign keyless) and publishing GitHub artifact attestations / SLSA provenance, with the action verifying them, is a follow-up.
Tags are never reused
Section titled “Tags are never reused”The c65llc organization enforces immutable releases on every repository. Once
a version is published, its tag can never be created again, not even after the
repository is deleted and recreated under the same name. A release that has to
be redone ships as the next patch version. That is why the first release of
this repository is v0.1.2: v0.1.0 and v0.1.1 were published before the
repository was rebuilt, and their tags are permanently reserved.