Releasing Ribbon¶
Branches¶
mainis development. Everything lands here first. Its version isX.Y.0-dev.N(for example0.2.0-dev.1).release/X.Y(for examplerelease/0.2) is cut frommainwhen a version is ready to be tried by real users. Only fixes go there afterwards.:devimage. Every push tomainpublishesghcr.io/thepizzatech/ribbon:dev(and:sha-<short>) via.github/workflows/publish-dev.yml; no tag is needed.- Tags
vX.Y.Z[-pre.N]mark releases and are what publish them. Tags are only created on arelease/*branch.
Versions¶
Semantic Versioning: 0.2.0-beta.1, then 0.2.0-beta.2, 0.2.0-rc.1, 0.2.0, then fixes 0.2.1. While we are on 0.x, a minor bump may include breaking changes; the CHANGELOG says so under "Breaking".
The version lives in package.json. The build bakes it in and shows it in Settings → About, the sidebar and /api/health. The commit SHA is added by the GIT_COMMIT build arg.
Cutting a release (first beta of 0.2 as the example)¶
- On
main, make sure CI is green and CHANGELOG.md has everything that is going out. - Create the branch:
- On the branch, set the version and finish the changelog:
npm version 0.2.0-beta.1 --no-git-tag-version- In
CHANGELOG.md, turn the top section into## [0.2.0-beta.1] - YYYY-MM-DD(move anything under[Unreleased]into it) and add a fresh empty## [Unreleased]. - Commit:
git commit -am "Release 0.2.0-beta.1"andgit push -u origin release/0.2. - Tag and push the tag (the tag must equal
v+ the version inpackage.json, or the workflow refuses to publish):
- The Release workflow (
.github/workflows/release.yml) then: - runs typecheck, tests and the build,
- builds the Docker image for
linux/amd64andlinux/arm64, - pushes it to
ghcr.io/thepizzatech/ribbonas0.2.0-beta.1(and, for non-pre-releases only,0.2andlatest), - creates a GitHub Release with the matching CHANGELOG section, marked as a pre-release when the version has a
-. - Back on
main, bump to the next development version (npm version 0.3.0-dev.1 --no-git-tag-version), and copy the released CHANGELOG section across somainhas the history. - First publish only: in GitHub → Packages →
ribbon→ Package settings, set the visibility you want (public lets others pull without logging in).
Hotfixes¶
- Fix on
release/0.2(or fix onmainand cherry-pick:git cherry-pick -x <sha>). Keep fixes small. - Bump the version (
npm version 0.2.1 --no-git-tag-version), update the CHANGELOG, commit. - Tag
v0.2.1and push the tag. Same workflow, same outputs. - Make sure the fix is also on
main.
Running a published image¶
Not done yet¶
- No release branch or tags exist. The first ones are created following this document.
- The multi-arch image build has not been run yet; the first tag will be its first real test.