Skip to content

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.N with Set as a pre-release ticked. They publish only their exact image tag, never X.Y or latest.
  • 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 ​

  1. main is green and has been running on your own community without trouble.

  2. Releases → Draft a new release.

    • Choose a tag: type the new vX.Y.Z → Create new tag on publish.
    • Target: main.
    • Generate release notes.
  3. 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.
  4. Publish release. The Release workflow runs these jobs:

    1. guard: the tag is vX.Y.Z and on main;
    2. checks: CI on the tagged commit;
    3. image: amd64 + arm64 to ghcr.io/igorrius/homelander-bot:X.Y.Z, signed, with provenance;
    4. files: binaries, compose.yaml pinned to X.Y (a pre-release: its exact version), env.example, SHA256SUMS and its signature, attached to the release;
    5. promote: X.Y and latest move to the new image. Pre-releases skip this job.
  5. Check the release page shows the files, and that the image has a tag for the new version.

  6. 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 → service homelander → 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 moving X.Y tag.

If the workflow fails ​

Before promote, nothing that communities follow (X.Y, latest) has moved.

  1. Read the failed job's log.
  2. Delete the GitHub release, then its tag. The tag ruleset lets only admins do that.
  3. Fix the problem on main through a PR.
  4. 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 ​

  1. Before the first release, create the label:

    bash
    gh label create skip-changelog --description "Leave out of release notes" --color ededed
  2. Before 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.
  3. 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.source label links it to the repository. If it says private, use Package settings → Change visibility → Public.

  4. Try the whole path once with a pre-release, v0.1.0-rc.1, before v0.1.0.

Checking a release ​

upgrading.md has the cosign and gh attestation commands.

Released under the Apache License 2.0.