Releasing
How a version of Karyo is cut. A release is an annotated tag on main, the two images the release
workflow publishes for that tag, and a GitHub release whose notes a maintainer writes. Pushing the
tag is the only thing that publishes; everything before it can be rehearsed with a dry run that
publishes nothing.
Derived from .github/workflows/release.yml, build.gradle.kts, the two front-end
package.json files and scripts/check-image-reproducibility.sh.
What a release is
- One version for the whole product.
versionin theallprojectsblock of the rootbuild.gradle.kts(build.gradle.kts,allprojects.version) applies to every subproject (ADR 0024). The two front-end manifests carry the same string (frontend/web/package.jsonandfrontend/mobile/package.json,version), so their SBOMs name the release too. - An annotated tag
vMAJOR.MINOR.PATCHon the commit ofmainwhose version fields carry that version. A pre-release such asv2.0.0-rc.1follows the same rules. - Two images on GitHub's container registry, built, proved, scanned and pushed by the release
workflow for that tag:
ghcr.io/voyagerforge-dev/karyo-appandghcr.io/voyagerforge-dev/karyo-nginx, each tagged with exactly the version, neverlatest. The packages are private, like the repository (ADR 0032); how an installation obtains them is in container images. - A GitHub release for the tag, which the workflow opens as a draft with the evidence attached and a maintainer publishes after writing its notes.
CI builds both images on every push to main, starts them, and publishes neither
(.github/workflows/ci.yml, jobs.package, jobs.karyo-starts). Only the release workflow publishes, and only for a
pushed tag. A release deploys nothing: an installation decides when to run a new version
(upgrade, backup and recovery).
There is no changelog file, by decision. Release notes live in the GitHub release for each tag and nowhere else, so there is no second document that has to be kept in step with the tags. To see what changed between two versions, read their releases, or compare the two tags.
Choose the version
Semantic Versioning, against Karyo's published contracts: the REST endpoints and their fields, the
webhook payloads, and the SPIs and DTOs in the -api modules.
| Change since the last release | Version |
|---|---|
| Any breaking change to a published contract | Major |
| New capability, compatible with every published contract | Minor |
| Fixes only | Patch |
The engine modules implement SPIs from the -api modules, so an incompatible SPI change is a
major version even when nothing in this repository notices. A new migration can ship in any version;
one that needs an operator to act before or after the upgrade is called out in the notes.
Release schedule
Releases follow a fixed rhythm, so that installations have a predictable upgrade rhythm. The schedule starts once 2.0.0 is final.
- A patch release every two weeks. It carries bug fixes only, and a slot in which no fix has merged is skipped.
- A minor release once a quarter. It carries the new capabilities approved for that quarter.
- A security fix ships at once. It is cut outside the schedule and does not wait for a slot.
- Each slot follows Cut it. On the date the release pull request is prepared, the full checks run - CI at the merge commit, the nightly workflow and the dry run - and the maintainer approves each tag and each publish, as for any release.
The release workflow
.github/workflows/release.yml runs on the same self-hosted nebula runners as CI, with the same
rootless Podman, and has four jobs:
| Job | Runs on | What it does |
|---|---|---|
prepare |
every trigger | reads the version; for a tag, asserts the tag is annotated, names exactly that version, points at the checked-out commit and sits on main, that both front-end manifests carry the version, and that the actor may release; then runs the image-determinism audit (jobs.prepare) |
build |
dispatch and tag | resolves the three base images to digests and builds from those digests, verifies the jar legal files (./gradlew verifyJarLegalFiles), generates the three SBOMs and checks their components and licences against THIRD-PARTY-NOTICES.md, builds each image twice and requires identical image IDs, reads the labels and licence files back, lists the installed Alpine packages, scans both images with Trivy, and uploads everything as the release-evidence artefact (jobs.build) |
publish |
a pushed v* tag only |
refuses a version tag that already exists on either package, pushes the very tarballs that were scanned, and records the pushed digests (jobs.publish) |
draft-release |
a pushed v* tag only |
opens a draft GitHub release for the tag with the evidence and the publication record attached, marked pre-release when the version has a hyphen (jobs.draft-release) |
Publication is reachable only from a pushed tag. The two publishing jobs test the event as well
as the ref (jobs.publish.if, jobs.draft-release.if), because a manual dispatch accepts a tag as
its ref: gh workflow run release.yml --ref v2.0.0 builds and proves, and publishes nothing. No
dispatch input turns publication on. A tag run is never cancelled by a later one (concurrency).
Who may push the tag is guarded twice more. A repository tag ruleset on v* lets only the
owner create, update or delete a release tag. Inside the workflow, every job that holds a write
token first checks that both the actor and the triggering actor are listed in the repository
variable KARYO_RELEASE_ACTORS (comma or space separated logins) and fails when the variable is
unset, so a re-run by someone else is refused like a tag pushed by someone else
(jobs.prepare.steps: The actor may release). A GitHub environment with a required reviewer is
not part of the guard: on the GitHub Team plan, required reviewers and wait timers exist only for
public repositories, and this one is private.
Least privilege. The workflow's own token reads the repository and nothing else. publish alone
holds packages: write; draft-release alone holds contents: write. No job holds both a package
and a repository write. The registry login lives in an authfile in the job's temporary directory
and is removed when the job ends.
What the workflow cannot decide. It never publishes the GitHub release, never moves a tag and never makes a package public. The draft's notes are human-written (below).
Before the first release
These are owner settings, outside the repository, and the workflow refuses to publish without the second one:
- The
v*tag ruleset, restricting creation, update and deletion to the owner, read back withgh api repos/voyagerforge-dev/karyo-wms/rulesets. - The repository variable
KARYO_RELEASE_ACTORS, naming the owner's login.
Rehearse it: the dry run
Dispatch the workflow on the commit you intend to tag, before the tag exists:
gh workflow run release.yml --ref main
The run builds, proves and scans exactly what a tag would, and publish and draft-release are
skipped. Its release-evidence artefact (kept 14 days) holds evidence.txt - the version, the
commit, the base-image digests, both pairs of image IDs, the labels and licence files read back,
the scan verdicts - beside the three SBOMs, notices-check.txt, the two Trivy reports and the two
package lists. The notice check fails a dry run just as it fails a tag run. A dry
run on a commit whose front-end manifests disagree with build.gradle.kts records the difference
and passes; the same commit tagged would fail in prepare.
What a dry run cannot prove is everything after the build: the push, the package
visibility and access, the registry quota and the draft release. A pre-release tag (v2.0.0-rc.1)
proves those first, with its own version pull request.
Each run spends Actions minutes and occupies the single runner for its whole length; one green dry run on the commit is the proof, and repeating it for reassurance is not.
Fresh-install rehearsal
Before publishing 2.0.0, install the release candidate on an empty, disposable target using the
published digests from that candidate's published.txt. Use repository files from the candidate,
not a newer checkout. This proves the image-only path without a host build toolchain.
Prepare a separate installation directory with its own mode-0600
scripts/.env.prod.Choose an unused Compose project and host port. The public origin in that file must be
https://: the production application refuses to start with anhttp://issuer, even onlocalhost. Put a TLS terminator in front of the host port and set the origin to its address; for a disposable target a self-signed certificate that the browser and the API client trust is enough. The terminator must passX-Forwarded-Proto: httpsand the originalHostto nginx.Authenticate the container runtime to GHCR with read access.
Export both exact digest references and run the image-only installation:
export COMPOSE_PROJECT_NAME=karyo-rc-fresh export NGINX_HTTP_PORT=18088 export KARYO_APP_IMAGE='ghcr.io/voyagerforge-dev/karyo-app@sha256:<app digest from published.txt>' export KARYO_NGINX_IMAGE='ghcr.io/voyagerforge-dev/karyo-nginx@sha256:<nginx digest from published.txt>' ./scripts/deploy-server.sh --image-only --validate-env scripts/.env.prod ./scripts/deploy-server.sh --image-onlyVerify both running image digests, the console at
/, the floor app at/m/, and System sign-in.Complete the commissioning and operational checks in deploying.
Remove only this rehearsal's containers and volume when its evidence is saved.
The host needs Python and a container runtime with Compose, on the supported Linux/journald
platform. It needs no JDK, Node, npm or host build output. The nginx image carries both front ends.
Do not use --quick for this release check: the installation must pull exactly the candidate digests.
A rehearsal does not change an existing installation or authorize a production deployment.
Cut it
Open the release pull request. Its only change is the version fields:
build.gradle.kts, andnpm version "$VERSION" --no-git-tag-versioninfrontend/weband infrontend/mobile, which updates eachpackage.jsonand its lockfile root. It goes through review like any other change (CONTRIBUTING.md).Merge it once CI is green, then confirm CI is green again on
mainat the merge commit. A newer push tomaincancels the older run (.github/workflows/ci.yml,concurrency), so merge nothing else until that run has finished, and read the run of the merge commit itself. CI runs no test, so then dispatch the nightly workflow onmain(gh workflow run nightly.yml --ref main) and confirm every job of that run is green at the merge commit, with the backend, web and mobile test counts read rather than the summary.Dry-run the release workflow on that commit (above) and read its evidence.
Tag exactly that commit, with an annotated tag:
VERSION=2.0.0 # the version the release pull request set git switch main && git pull --ff-only git log -1 --format='%H %s' # must be the release pull request's merge commit git tag -a "v$VERSION" -m "Karyo $VERSION" git push origin "v$VERSION"Watch the release workflow for the tag. Every job must be green; the draft release appears with the evidence attached. Then check, from an account that only has read access, that both images pull by the digests in
published.txt, and that an anonymous pull is refused (container images).Write the notes and publish the draft. The notes say, for an operator: what changed; any migration, configuration or realm action needed, with a link to upgrade, backup and recovery; and any breaking contract change, with the upgrade path for whoever integrates with it. The notes also carry the evidence below.
The release gate, never reused: one version-bump PR, merged on CI green, pinned by an annotated tag, built and published by the release workflow, released with operator notes and evidence, then a fresh PR for the next release.
Derived from the release steps above; source
docs/diagrams/10-release-gate-flow.mmd.
Evidence a release carries
A release is the product's outward face, so its notes must let someone who did not build it check what it ships. The workflow attaches the files to the draft; the notes say what they show:
- Three CycloneDX SBOMs. The application's, which
quarkusBuildemits on every build (building), and the two front ends', generated from their lockfiles with the documentedcyclonedx-npmcommand. Each names the release version. - Notice coverage.
notices-check.txtrecords component and licence coverage againstTHIRD-PARTY-NOTICES.mdfor all three SBOMs. It identifies declarations reviewed against independent sources because Quarkus with Gradle supplies no licence metadata (the comparison's limits). - Reproducibility evidence. Both images were built twice from the same tree with every
input's modification time restamped in between, and each pair of image IDs is equal; the notes
quote the IDs and the commit. The claim is scoped to what was proved: the tagged tree rebuilds
to the same images from the base-image digests recorded in
evidence.txt, while theapk upgradelayer takes whatever Alpine's package feed serves at build time, so a later rebuild is compared against the package lists recorded beside the digests (container images). - The scans. Trivy at CRITICAL and HIGH on both images, both clean, with the reports attached.
- Where the images are. The two image names, the version tag and the pull-by-digest
references from
published.txt, so the notes and the operations page never disagree.
Rules
- A published tag never moves and is never reused. A mistake in a release is fixed by the next version. The workflow refuses to push a version tag either package already has.
- A release is cut only from
main, never from a branch or a commit that did not pass CI there. The workflow refuses a tag that is not onmain. - Releasing is separate from deploying. Say which one happened: a tag says a version exists, not that any installation runs it.
- The whole product releases together. Every module - the engine modules included - is in this repository and cuts from the same tag; there is no separate release for any of them.
- If it fails before the push, nothing was published. Fix on
mainand cut the next version. If it fails after a push and before the release is published, the owner deletes the package versions and the draft, the tag stays as history, and the next version's notes name the deleted digests. A published release is never deleted; the next version's notes name the digest that must not be run and why.
Related
- ADR 0024 - commits and versions
- ADR 0056 - why only a pushed tag publishes
- Container images - what the two images are and how they are proved
- Upgrade, backup and recovery - what an installation does with a new version
- Operations and the delivery pipeline - what CI builds and proves
- Maintaining this repository - keeping documents true across a release