Releasing
kumoba ships as four crates on crates.io (kumoba-protocol, kumoba-guest, kumoba, kumobad), one npm package (kumoba) and a GitHub release with host tarballs. They share one version and go out together from one tag.
Versioning
- One version for everything. The SDK version tells you which
kumobadit was tested against, and thekumobadversion tells you which guest agent its images need. - Pre-1.0: a minor bump (
0.2.0) may break the HTTP API, the SDK or the host-guest protocol; a patch bump never does. - Bumping
VERSIONincrates/kumoba-protocol/src/lib.rsis always a minor bump, and the changelog entry says that images must be rebuilt. The worker refuses a guest with another protocol version, so a stale image fails loudly rather than subtly. - Every pull request that changes behaviour adds a line under
## [Unreleased]inCHANGELOG.md. The release notes are generated from that section, so write for users, not for the diff.
Cutting a release
On a clean main checkout that CI has passed:
scripts/release.sh 0.2.0
git show --stat HEAD
git push origin main v0.2.0release.sh writes the version into Cargo.toml, Cargo.lock, package.json and package-lock.json, turns the Unreleased section into ## [0.2.0] - <date> with compare links, runs scripts/release-check.sh, commits Release v0.2.0 and tags v0.2.0. It pushes nothing.
Pushing the tag runs .github/workflows/release.yml:
- check:
scripts/ci-release.shconfirms the tag, manifests and changelog agree, runs the Rust lints and unit tests,cargo publish --workspace --dry-runand the SDK typecheck, build, tests andnpm pack --dry-run. - assets: builds
kumoba-<version>-linux-x86_64.tar.zst,-linux-arm64.tar.zstand-macos-arm64.tar.zstwithscripts/release-assets.sh. Linux tarballs carry the patched libkrun and libkrunfw; the macOS tarball expects Homebrew's. - images:
scripts/release-images.shbuilds thetestanddefaultguest images on Linux x86_64 and arm64 askumoba-image-<name>-<version>-<arch>.raw.zst. macOS uses the arm64 images. - smoke:
scripts/release-smoke.shinstalls the x86_64 tarball and both images withscripts/install.sh, startskumobadwith an empty environment and boots each image through the SDK with no options. Nothing is published unless this passes. - publish-crates:
scripts/publish-crates.shpublishes the crates in dependency order with a short-lived token from crates.io trusted publishing. - publish-npm:
scripts/publish-npm.shpublisheskumobato npm through trusted publishing, which also attaches a provenance attestation. - release:
scripts/publish-release.shcreates the GitHub release with the changelog section, an install section, the generated contributor notes, the tarballs, the images andSHA256SUMS.scripts/install.shdownloads from the latest release, so users get it from this moment.
Every publish step skips a version the registry already has, so rerunning a failed workflow is safe. Running the workflow by hand from the Actions tab does steps 1 to 4 only, which is the way to test the pipeline, including the installer, without a tag.
When something goes wrong
- A release that must not be used:
cargo yank --version X.Y.Z <crate>for each crate andnpm deprecate kumoba@X.Y.Z "<reason>", then ship a fixed patch release. Nothing is ever unpublished or re-tagged. - A broken tarball with good packages: fix the script, rerun the workflow.
publish-release.shreplaces assets on an existing release. - A tag on the wrong commit that has not been pushed:
git tag -d vX.Y.Zandgit reset --hard HEAD~1, then start again.
Registry setup
Done for kumoba 0.1.0: the four crates and the npm package trust release.yml in this repository through OIDC, so releases publish without stored tokens, npm attaches provenance, and nothing needs a manual publish. Repository rulesets stop v* tags from being moved or deleted and stop force pushes to or deletion of main.
A new crate or npm package added to the release needs the same setup once: publish its first version by hand from the tagged commit, then add the trusted publisher (crates.io: the crate's Settings, Trusted Publishing, GitHub, owner Parassharmaa, repository kumoba, workflow release.yml; npm: npm trust github <package> --file release.yml --repo Parassharmaa/kumoba --allow-publish). npm drops a trusted publisher that has not published within two days of being added, so add it right before a release.