Cutting a release
Releases are for communities other than the one that deploys main. The owner cuts them by hand. Design: releases and distribution.
Version numbers
vX.Y.Z, semver. While X is 0:
- Raise Y (
v0.3.4→v0.4.0) for new features, or for anything an admin must act on: a new required variable, a changed default, a removed feature, a data change worth a backup. - Raise Z (
v0.3.4→v0.3.5) for fixes only. - Pre-releases are
vX.Y.Z-rc.Nwith Set as a pre-release ticked. They publish only their exact image tag, neverX.Yorlatest. - A number is never reused. Not even after a failed release whose tag was deleted, because its image tag may already be in GHCR.
Steps
mainis green and has been running on your own community without trouble.Releases → Draft a new release.
- Choose a tag: type the new
vX.Y.Z→ Create new tag on publish. - Target:
main. - Generate release notes.
- Choose a tag: type the new
Put this on top of the generated list:
markdown## Upgrade notes - Nothing to do. / New variable `FOO` (required): … / Back up before upgrading: this release changes … See docs/upgrading.md.Publish release. The Release workflow runs these jobs:
- guard: the tag is
vX.Y.Zand onmain; - checks: CI on the tagged commit;
- image: amd64 + arm64 to
ghcr.io/igorrius/homelander-bot:X.Y.Z, signed, with provenance; - files: binaries,
compose.yamlpinned toX.Y(a pre-release: its exact version),env.example,SHA256SUMSand its signature, attached to the release; - promote:
X.Yandlatestmove to the new image. Pre-releases skip this job.
- guard: the tag is
Check the release page shows the files, and that the image has a tag for the new version.
A new minor only (
v0.3.x→v0.4.0): move the Railway template to it, so new communities start on the newest line. railway.com/workspace/templates → Homelander → Edit → servicehomelander→ Settings → Source: change the image tag (:0.3→:0.4), apply, and update the minor line mentioned in the template's overview (Marketplace tab). Communities already running keep their tag until they change it themselves. Patch releases need nothing here: the template follows the movingX.Ytag.
If the workflow fails
Before promote, nothing that communities follow (X.Y, latest) has moved.
- Read the failed job's log.
- Delete the GitHub release, then its tag. The tag ruleset lets only admins do that.
- Fix the problem on
mainthrough a PR. - Cut the next patch number.
If promote itself failed, re-run that job from the workflow run page.
Sorting the release notes
.github/release.yml sorts the generated list by PR label:
- Features:
type:feature,enhancement; - Fixes:
type:bug,bug; - Docs:
type:docs,documentation; - Other: everything else.
A PR labelled skip-changelog is left out.
One-time setup
Before the first release, create the label:
bashgh label create skip-changelog --description "Leave out of release notes" --color edededBefore the first release, add a tag ruleset: Settings → Rules → Rulesets → New tag ruleset, named
protect-release-tags.- Target:
v*. - Restrict creations, updates and deletions, with Repository admin in the bypass list.
- Target:
After the first release, check the image is public. Open the package: a package of a public repository is created public, and the image's
org.opencontainers.image.sourcelabel links it to the repository. If it says private, use Package settings → Change visibility → Public.Try the whole path once with a pre-release,
v0.1.0-rc.1, beforev0.1.0.
Checking a release
upgrading.md has the cosign and gh attestation commands.