chant release
Synopsis
Section titled “Synopsis”chant release cut [<label>|auto [--pre <id>] [--first <version>]] [--at <sha>] [--yes] [--dry-run] [--build <command>] [--param <name=value>]... [--params-file <file>] [--src <dir>] [-o <file>] [--lexicon <name>] [--actor <name>] [--sign [<key file>]] [--channel <tag>] [--lane <name>] [--override-green] [--image <component>=<repository>@sha256:<hex>]... [--json]chant release next [--at <sha>] [--pre <id>] [--first <version>] [--json]chant release changed [--at <sha>] [--bump-member <member>=<level>]... [--json]chant release candidates [--env <env>] [--branch <branch>] [--lane <name>] [--forge-issues] [--json]chant release compose <name> [--base <label|sha>] (--pr <n> | --work <id>)... [--yes] [--json]chant release doctor [--from cut] [--json]chant release publish <label|digest> [--yes] [--allow-unsigned] [--require-provenance] [--json]chant release verify <label|digest> [--sigstore [--assets <dir>]] [--json]chant release evidence <label|digest> -o <dir> [--sign [<key file>]] [--referrers] [--sigstore] [--assets <dir>] [--json]chant release evidence --since <date> [--until <date>] -o <dir> [--sign [<key file>]] [--referrers] [--sigstore] [--assets <dir>] [--json]chant release evidence --check <dir> [--json]chant release stamp <label> [--json]chant release tag <label|digest|tag> [--json]chant release artifacts <label|digest> [--no-build] [--from <dir>] [-o <dir>] [--json]chant release images <label|digest> [--no-build] [-o <file>] [--json]chant release images --repin [<file>...] [--check] [--json]chant release init [--yes] [--force] [--one-release] [--forge github|gitlab|forgejo] [--json]chant release workflow [--forge github|gitlab|forgejo] [--install <command>] [--build <command>] [--chant <command>] [--output <file>] [--force]chant release deprecate <label|digest> [--yes] [--reason <text>] [--replacement <label>] [--actor <name>] [--sign [<key file>]] [--json]chant release yank <label|digest> [--yes] [--reason <text>] [--replacement <label>] [--forge-release prerelease|draft|delete] [--actor <name>] [--sign [<key file>]] [--json]chant release restore <label|digest> [--yes] [--actor <name>] [--sign [<key file>]] [--json]chant release list [--json]chant release export <label|digest> --env <env> [-o <dir>] [--json]A release is the compiled output of one green commit of one member (#4026, ws-104). The commit is the source, and the release is what moves through the environments. A release holds the commit, the artifacts built once from it, and one target per environment. A target lists the templates compiled for that environment and the build parameters they were compiled with.
This is a separate object from a deploy record. A deploy record is a line of <env>/releases.jsonl that chant run --components and chant components promote append when they deploy a component. chant components promote --release deploys one target and names its digest on the deploy record it writes.
Subcommands
Section titled “Subcommands”Each subcommand has a page of its own.
| Subcommand | What it does |
|---|---|
| release artifacts | Builds the files release.artifacts declares again from the release’s commit, or checks those on disk, against the digests the release records. |
| release candidates | Lists the green commits of trunk a release can be cut from, newest first, with what each would ship. |
| release changed | Lists the members to release at a commit, in publish order, each with why and its bump. |
| release compose | Picks chosen changes from trunk onto a base, on the branch chant/compose/<name>. |
| release cut | Cuts a release of the member in the current directory from a green commit: compiles every environment, records the release and tags the commit. |
| release deprecate, yank and restore | Records a status for a published release and acts on each target that can: deprecate, yank, or restore. |
| release doctor | Asks each release.publish target whether a publish from here can succeed, before anything is cut. |
| release evidence | Writes the records of a release, or of a period, into a directory with an index by control id and the SHA-256 of every file, and checks such a directory. |
| release export | Writes the files a release recorded for one environment, each checked against its digest. |
| release init | Sets up chant release in a project: its release block in chant.config.ts, the release workflow, and the registry steps to take by hand. |
| release list | Lists every release of the member, newest cut first, with its cuts and where it runs. |
| release next | Prints the label of the member’s next release, from the conventional commits and intent files since its previous release. |
| release publish | Publishes a cut release to the targets release.publish declares, with its provenance and SBOMs. |
| release stamp | Writes the label as the version of the manifests release.version names, as the cut does before its build. |
| release tag | Prints the tag release.tag gives a release of the member, found by its label, its digest or the tag itself. |
| release verify | Checks, offline, that a release was signed by a key .chant/allowed_signers lists, and with --sigstore its Sigstore signatures and provenance. |
| release workflow | Writes the release workflow: the publish job on a release tag, or the whole release started by hand. |
Reading the config
Section titled “Reading the config”Every subcommand but init reads the release block of the member’s chant.config.ts or chant.config.json, and of the workspace root’s when the member sits in a workspace. A config that is there and can’t be loaded refuses the command with release-config-unreadable, naming the file and the error, before it reads anything else (#5263). It is never read as a config with no release block, which would give release next no release.tag to find the previous release by.
A chant.config.ts is TypeScript, which chant reads with tsx, an optional dependency. chant takes it from its own install, else from the project’s node_modules, so a chant run with npx @intentius/chant@<version> uses the tsx the project has installed. With neither, a node that strips types itself (22.18 and newer) reads a config written in the TypeScript it can strip, such as export default { release: { ... } } with type-only imports. When none of that works, the refusal says what to do: install tsx in the project (npm i -D tsx), run chant beside it (npx -p tsx -p @intentius/chant@<version> chant release ...), or write the config as chant.config.json, which needs no tsx. RELEASE_CONFIG_UNREADABLE_FLOOR in @intentius/chant/cli/handlers/release-config is the first chant that does this.
Joining a release to its commit, gates and deploys
Section titled “Joining a release to its commit, gates and deploys”The records name one another through the release digest (#4043). From a commit, a release, a release gate or a deploy record, the others are one lookup away:
| From | To | Through |
|---|---|---|
| commit | releases | the commit of each _releases/<releaseDigest>.json |
| release | gates | releaseDigest on the facts of _gates/release.jsonl |
| release | deploy records | releaseDigest on the records of every <env>/releases.jsonl, or for a record with none, the release gate resolution its admission names |
| deploy record | release | its releaseDigest, or for a record with none but an admission of op release, the resolution that admission names |
A deploy record’s env with its releaseDigest names the target. components promote --release and run --components --release write the field, and components rollback and components redeploy copy it from the record they restore. workspace status lists it on each item as releaseDigest, with releaseLabel, the label the cut gave.
joinRelease in lifecycle/release-join.ts does the walk for a library reader. It takes { commit }, { commits }, { release }, { deploy } or { gate } and returns what it found, each with its label, commit, cuts, gates and deploys. A commit can have several. { commits } joins every release cut from any of several commits and reads the ledgers once (#4023). A starting point that names nothing returns an empty list and a reason. workspace graph --intent uses it for the why chain, from a piece of code to the releases and deploys that shipped it.