Skip to content

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.

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.

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.

A maintainer with push access to c65llc/airframe does this; tags and releases are cut only with the repository owner’s explicit approval.

  1. 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 (feature bumps the minor, breaking/major the 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 exact vX.Y.Z you will tag, and edit the notes if needed. Do not publish the draft: publishing it in the UI would create the tag without the main check and before the assets exist.

  2. Check main is green. ci passed on the commit you are releasing.

  3. Tag and push from an up-to-date main:

    Terminal window
    git switch main && git pull --ff-only
    git tag -a v0.1.0 -m "v0.1.0"
    git push origin v0.1.0
  4. Watch Release. When it finishes, the release v0.1.0 is published with the draft’s notes, six archives, checksums.txt, airframe-vscode-0.1.0.vsix and airframe-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) and airframe-desktop.sha256, and v0 and v0.1 point 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}
  5. Run Action release test (Actions → Action release test → Run workflow, version vX.Y.Z): it must pass on all three operating systems. It is the only check that downloads the published assets through the action itself.

  6. 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.txt
    shasum -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.

  • 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.

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, .zip on windows), checked with a curl shim that records the URL;
  • the run step, with a GoReleaser snapshot binary on PATH, lints testdata/minimal with lint --format github and exits 0, and refuses a multi-line args;
  • build --check exits 0 on a clean copy of testdata/minimal and 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 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.

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:

  1. 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 (a v0.11.5 patch after v0.12.0 does not take the site back), a dispatch from a branch other than main, and anything before the first stable release.
  2. build is site.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.
  3. dry-run (read-only) checks that tree as publish would and lists it, file by file, without pushing. It runs on a pull request that changes publish.yml, site.yml or live-tree.sh, and on a dispatch with dry_run ticked.
  4. publish, the only job with contents: write, checks out nothing and runs no project code. It checks the tree again, then replaces live with one orphan commit holding exactly that tree, pushed with the built-in GITHUB_TOKEN and --force-with-lease against 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 a live that 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.

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.

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:

  1. Publish live first: merge the website, then cut the next release (or, after a release exists, run Publish site from main), and check that live exists (git ls-remote origin refs/heads/live) and its root holds index.html, 404.html and _headers. No ruleset or branch protection may cover live, or the bot’s forced push is refused.
  2. Workers & Pages → airframe → Settings → Build (Builds & deployments) → Branch control: set the production branch to live. Set Preview branches to None: main and pull request branches are not deployable trees. Leave Enable automatic production branch deployments on: it is what deploys each new live commit.
  3. In the same settings, Build configuration: Framework preset None, Build command empty (none), Build output directory / (or leave it empty). Root directory stays /.
  4. After switching, re-run Publish site from main and wait for its live commit to go live as production. Pushes to live made 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 that live already holds this build (an unchanged tree pushes nothing, so nothing deploys), instead use Deployments → Retry deployment on the newest live deployment.
  5. 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.

Terminal window
site=https://airframe.uijig.com
for 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"
done
curl -s -o /dev/null -w '%{http_code}\n' "$site/no-such-page/" # 404
curl -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 one 404, and the landing page shows the new version.
  • / has a Content-Security-Policy with hashes in script-src and no 'unsafe-inline' there; /app/ has the site’s policy and the /app/* one (joined into one header, or two), the latter with worker-src 'self'.
  • /app/core/airframe.wasm is served as application/wasm.
  • /schema/v1/*.json are byte for byte what airframe schema <name> prints.
Terminal window
go run github.com/goreleaser/goreleaser/v2@v2.20.3 check
go run github.com/goreleaser/goreleaser/v2@v2.20.3 release --snapshot --clean # writes dist/ (gitignored); publishes nothing
dist/airframe_*/airframe version
  • 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.

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.