Repository navigation
Releasing
github-actions[bot] edited this page Nov 22, 2026
·
3 revisions
How Spotcraft is released. What a version promises is in ADR 0019.
- On a
chore/release-0.2.0branch fromorigin/main, set the version everywhere:node scripts/check-versions.ts 0.2.0. - In
CHANGELOG.md, renameUnreleasedto the version and date, and add its compare link. - Open a pull request into
mainwith the changelog section as its body, and merge it once the checks pass. Tag the merge commit and push:git fetch origin && git tag -s v0.2.0 'origin/main^{commit}' -m v0.2.0 && git push origin v0.2.0. There is no other branch to merge back into:mainis the only one (ADR 0042). - CI verifies the tagged commit, then publishes:
- the
spotcraftimage, tagged0.2.0,0.2andlatest(merges tomainpublish onlysha-<short>); -
spotcraft(the CLI) on npm (latest, ornextfor a pre-release), with provenance. A version already on npm is skipped, so a failed run can be re-run. - the bundle (ADR 0047), once the image is out:
spotcraft-0.2.0.tar.gzwithinfra/serverandremote-deploy.sh,SHA256SUMSand a build attestation. The same job creates the GitHub release with the changelog's section, or adds the bundle to one that already exists.
- the
- Deploy it from the instance's own repository: with kodentuzo/hetzner, bump
spotcraft.versionand run Deploy. Rolling back is deploying the previous version.
An npm version can't be replaced: fix a broken one with a new patch release and deprecate the
broken one (npm deprecate spotcraft@0.2.0 "Use 0.2.1").
Only the original repository (kodentuzo/spotcraft) publishes to npm; CI skips the step
in forks.
- On npmjs.com, create the free organization that owns the CLI's scope (
kodentuzo). -
First release only:
- create a granular access token that can publish packages (expiry: a few days);
- store it as the secret
NPM_TOKENin a GitHub environment namednpm; - release as above. The first versions are published with that token and
--provenance.
- On npmjs.com, link a trusted publisher in the CLI's package settings. The fields are case-sensitive:
- provider: GitHub Actions;
- organization or user:
kodentuzo, repository:spotcraft; - workflow filename:
ci.yml, environment:npm; - allow
npm publish(newer links only allownpm stage publishunless ticked).
- Delete the
NPM_TOKENsecret and revoke the token. From then on CI publishes through GitHub's OIDC token, with no stored secret.
Published from docs/. Edit the files there; changes here are overwritten.