Publish Targets
chant release publish sends a cut release to the targets its member declares (#4047). This page covers the declaration and each target with its credentials, how a publish stages every target before any becomes visible and resumes after a failure (#4048), the SBOM and provenance each target attaches (#4049), and the contract in packages/core/src/lifecycle/release-publish.ts that a new target implements. The command itself is on chant release.
Declaring targets
Section titled “Declaring targets”Targets are declared under release.publish in the member’s chant.config.ts, a list that the publish runs in order:
export default { environments: ["dev", "prod"], release: { publish: [ { type: "npm", packages: ["packages/core", "packages/cli"], access: "public" }, { type: "oci", image: "dist/api.oci.tar", repository: "ghcr.io/acme/api", usernameEnv: "GITHUB_ACTOR", passwordEnv: "GITHUB_TOKEN" }, { type: "forge", forge: "github", repo: "acme/api", assets: ["dist/api-linux-amd64.tar.gz"] }, { type: "homebrew", tap: "acme/homebrew-tap", formula: "Formula/api.rb", template: "packaging/api.rb", assets: ["dist/api-linux-amd64.tar.gz"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" }, { type: "pypi", files: ["dist"] }, { type: "cargo", crates: ["acme-core", "acme-cli"] }, { type: "maven", bundle: "artifact:maven" }, { type: "nuget", packages: ["artifact:nuget"] }, { type: "rubygems", gems: ["artifact:gem"] }, { type: "index", preset: "krew", name: "api", template: "packaging/krew.yaml", assets: ["artifact:api"], url: "https://github.com/acme/api/releases/download/{tag}/{name}" }, { type: "helm", charts: ["artifact:chart"], oci: { repository: "ghcr.io/acme/charts" }, index: { repo: "acme/charts" } }, ], },};Paths are relative to the member’s directory. A declaration names the environment variables its credentials are read from, and never holds a credential: an unknown key, such as password, fails validation. A block that does not validate stops the publish with publish-config-invalid.
The config is read from the checkout the publish runs in. With at least one target, the publish refuses a checkout whose HEAD is not the release’s commit (release-head-mismatch) or whose tree has a change or an untracked file git does not ignore (release-worktree-dirty). So the config, and every file a target reads, are the release commit’s. A CI job that checks out the release’s tag passes both checks. Build outputs that the job makes before it publishes belong in .gitignore.
A target never builds. It uploads the files that are there. A file that the release records as an artifact of the same kind at the same path must match the release’s digest, or the publish stops with publish-artifact-digest-mismatch.
| Field | Meaning |
|---|---|
packages | Package directories or .tgz files from npm pack in the order to publish them. The first is the set’s core |
registry | The registry URL. Default: the one npm’s own config names |
access | public or restricted for npm’s --access |
sbom | The SBOM file each package carries at its root. Default: the first of sbom.spdx.json, sbom.cdx.json and sbom.cyclonedx.json it holds. false publishes without one |
stage | false publishes each package straight to latest, or the tag the publish names, with no next stage and no npm dist-tag move. Use it when the credentials may publish but not move a dist-tag, as with trusted publishing when the package’s record does not allow npm dist-tag. Default true |
tokenEnv | A variable holding an npm token. When a package’s publish fails to authenticate, as with a broken trusted-publisher record, it is published again with that token from a temporary npm user config, and again without --provenance if the registry refuses the attestation on the token path. Unset or empty, nothing is retried |
pins | A file in each package, from its root, holding the image digests it pins, such as dist/image-digests.json. Every sha256: digest in it must be an image the release records (release.images), or the plan refuses the package. Read by chant 0.124.71 and newer |
registryWait | A cap, in seconds, on the reveal’s wait for the registry to serve every version it published before it installs them to audit. Past it the publish stops with publish-npm-not-served. Default: no cap |
The stage runs, for each package, npm view <name>@<version> version to ask whether the registry already holds the version. When it doesn’t, it runs npm publish <package> --tag next with the declared --registry and --access, and --provenance when the run has an OIDC token. A publish from GitHub Actions with id-token: write gets npm provenance this way. So does one from GitLab CI with SIGSTORE_ID_TOKEN, and npm trusted publishing works in both. A version under next is not what latest or a range resolves to, so a consumer sees nothing yet. A version already on the registry is not published again. When one package fails, the error names the packages staged before it.
The reveal runs npm dist-tag add <name>@<version> latest for each package in the declared order, with the declared --registry. The first package declared is the set’s core, and its latest moves first, so a consumer that resolves a new package also finds its new core. Order the list core first, then each package after the packages it depends on. This is the order chant’s own releases use (#3903).
A release whose label is a semver prerelease, such as 1.4.0-rc.1, reveals under a dist-tag named for its id: rc for 1.4.0-rc.1, beta for 2.0.0-beta.3, and next when the id is a number or latest. latest does not move. A --channel on the cut decides the tag instead. See Prereleases.
A new package is the exception: npm makes its first version latest whatever tag it is published under, so that version is visible as soon as it stages. Moving a dist-tag needs credentials that may change dist-tags. Over OIDC that is “Allow npm dist-tag” on the package’s trusted-publisher record, which is separate from publishing.
With an OIDC token, the reveal then checks what it published. A registry accepts a publish before it serves it, so the reveal first runs npm view <name>@<version> version for each package every 10 seconds until all of them answer (#4244), and prints the packages still missing about once a minute. A 404 means not yet. Any other failure of npm view is the registry’s error, and the publish stops with publish-npm-registry-failed and npm’s message (#4271). With registryWait declared, it stops with publish-npm-not-served naming the packages still missing once that many seconds pass. In an empty temporary directory it then runs npm install --ignore-scripts --no-audit --no-fund for every package at its version, then npm audit signatures, both with the declared --registry. An install that fails with ETARGET or ERESOLVE waits once more and installs again. The registry serves a provenance attestation a few seconds after the version, so an audit that fails only on a 404 for /-/npm/v1/attestations/ is run again every 10 seconds for up to two minutes; if the attestation is still missing then, the publish stops with publish-npm-audit-failed and a message saying it never appeared. A registry that serves no signing keys, such as GitHub Packages, leaves npm with nothing it can audit, and npm audit signatures exits 1 with “found no dependencies to audit that were installed from a supported registry”. chant then logs that the registry serves no package signatures, skips the audit, and the reveal finishes and is recorded. The release doctor says so for an npm target whose registry is not registry.npmjs.org: signatures are audited only where the registry serves them. When npm fails the audit with FETCH_ERROR, because a registry answer was not JSON, no signature has been judged: the audit runs again after 10 seconds, up to three more times, and each try logs a line. If it still fails that way, the publish stops with publish-npm-audit-unavailable, which quotes the FETCH_ERROR line and says the audit could not run. By then latest has moved, and running the publish again audits again. Any other audit failure stops at once. npm fails the audit when a package’s registry signature or provenance attestation does not verify, and the publish stops with publish-npm-audit-failed. By then latest has moved, so the error says the packages were published. Run again, the publish moves no tag that moved and audits again. A workstation has no token and so no npm provenance to audit, and there the step does not run.
For both steps npm authenticates with its own config. chant reads no npm token and writes no .npmrc. On a workstation that is npm login. In GitHub Actions, actions/setup-node with registry-url writes an .npmrc that reads NODE_AUTH_TOKEN, and trusted publishing needs no token. npm runs with the run’s environment, and chant masks what it prints.
OCI registries
Section titled “OCI registries”| Field | Meaning |
|---|---|
image | An OCI image layout as a directory or as the tar file docker save writes. Its index.json names one image manifest or one index |
repository | <registry host>/<name> like ghcr.io/acme/api |
tags | Tags to point at the pushed digest. {label} is the release’s label, and {version} the label from its first digit. The default is ["{label}"] when the release has a label. A release whose label is a semver prerelease drops a latest tag and keeps the rest, or the label tag when nothing else is left |
platformTags | Tags for each platform’s image in the archive’s index, such as ["{version}-{arch}"] for 1.4.0-amd64 and 1.4.0-arm64. {arch} is the platform’s architecture with its variant (armv7), {os} its OS. Each names {arch} and {label} or {version}, so it belongs to the release and a status change never moves it. The reveal points them at the platform images the stage pushed by digest; two images that would take one tag are refused (publish-oci-platform-tag-taken). OCI_PLATFORM_TAGS_FLOOR is the first chant that reads it |
usernameEnv and passwordEnv | The variables holding the registry user and its password or token. The defaults are OCI_USERNAME and OCI_PASSWORD |
sbom | An SPDX or CycloneDX JSON file to attach, relative to the member. Default: one written from the member’s lockfile. false attaches none |
The target speaks the registry HTTP API directly, so it needs no registry client installed. The stage pushes by digest only. It asks whether the registry already holds the image’s manifest digest and sends nothing when it does. Otherwise it uploads each config and layer blob the registry does not hold yet, checking each against its digest first, then puts each manifest by its digest, then the index when there is one. It then pushes the SBOM and the provenance statement (and, when the publish scans, the scan’s findings) as referrers of the image, each by its digest and only when the registry does not hold it. A consumer that pulls by tag sees none of it. The reveal points each tag at that digest.
Each referrer is an OCI artifact manifest with the empty config (application/vnd.oci.empty.v1+json), the file as its one layer, the image as its subject, and the file name in org.opencontainers.image.title. An SBOM (application/spdx+json or application/vnd.cyclonedx+json), the provenance statement (application/vnd.in-toto+json) and a Sigstore bundle carry their media type as the artifact type and the layer’s type. The scan’s scan.json is application/json in both, with its own type, application/vnd.intentius.chant.scan.v1+json, in the io.intentius.chant.media-type annotation on the manifest and the layer, because registries that check an artifact type against a list of known types, such as registry.gitlab.com, refuse that one with MANIFEST_INVALID. Every type in an artifact type, config or layer chant pushes is one those registries know. A release published before kept the scan’s type as the artifact type; a resumed stage that finds that manifest keeps it and does not attach the findings again. A Basic challenge takes the credentials as they are. A Bearer challenge, as GHCR and Docker Hub send, exchanges them for a token at the realm it names.
With neither variable set, the target reads the registry’s auths entry from the docker config file ($DOCKER_CONFIG/config.json, else ~/.docker/config.json) that docker login writes. It does not run a credential helper (credsStore). With none of these, the push is anonymous.
docker.io is reached at registry-1.docker.io, and a one-part Docker Hub name is under library/. A host of localhost, 127.0.0.1 or [::1] is reached over http, any other over https. Pushing an image to a cloud registry per environment is still the publish-image deploy step’s job (Build Archive); this target is for registries that publish the release itself.
Forge release assets
Section titled “Forge release assets”| Field | Meaning |
|---|---|
forge | github, gitlab or forgejo |
repo | owner/name on GitHub and Forgejo; the project path or numeric id on GitLab |
assets | Files to attach. Each is named by its file name, which must be unique. artifact:<name> names every file the release records for that release.artifacts entry. May be empty when notes is set |
notes | The release’s notes: { file?, heading?, linkBase?, generate?, types?, exclude?, nonConventional?, before?, after? }, a section of a file in the member, notes generated for the release, or both. See below. Read by chant 0.124.71 and newer; generate and types by chant 0.124.101 and newer |
api | The API root. Default: $GITHUB_API_URL, else https://api.github.com on GitHub; $CI_API_V4_URL, else https://gitlab.com/api/v4 on GitLab; $GITHUB_API_URL on Forgejo, which has no other default |
tag | The forge release’s tag. Default: the tag the cut made, which release.tag names (release/<label> or release/<member>/<label> when it is unset) |
tokenEnv | The variable holding the token. Default: GITHUB_TOKEN on GitHub, GITLAB_TOKEN then CI_JOB_TOKEN on GitLab, FORGEJO_TOKEN on Forgejo |
sbom | An SPDX or CycloneDX JSON file to attach, relative to the member. Default: sbom.spdx.json written from the member’s lockfile. false attaches none |
latest | GitHub only: true, false or "legacy", sent as GitHub’s make_latest when the reveal publishes the draft. false keeps the repository’s latest release where it is, and "legacy" lets GitHub pick by creation date and semantic version. Unset, the reveal sends true, or false for a release cut with --channel. Another forge refuses it with publish-forge-latest-unsupported. Read by chant 0.124.63 and newer |
A release with no label and no declared tag is refused (publish-forge-no-tag). The SBOM and release.intoto.json, the provenance statement, go with the declared assets as two more, so their names must not be taken by an asset. The stage puts the assets where no consumer sees them, and the reveal makes the release visible with all of them at once.
| Forge | Stage | Reveal |
|---|---|---|
| GitHub | Finds the draft release for the tag, or creates one with draft: true at the release’s commit, and uploads each asset to its upload_url | Publishes the draft, and GitHub creates the tag if it was not pushed |
| Forgejo | The same draft, with a multipart upload of each asset to /repos/{repo}/releases/{id}/assets | Publishes the draft, as GitHub does |
| GitLab | Puts each asset in the project’s generic package registry as package release at the label’s version. GitLab has no draft release, so it makes none | Creates the release at the commit with a link to each asset, in one request |
An asset already on the draft with the same name and a matching digest is left as it is, so a stage run again uploads only what is missing. One whose digest differs is refused (publish-forge-asset-exists), and so is one on Forgejo, which reports no digest. A release already published for the tag is refused (publish-forge-release-published), since assets uploaded to it would show one at a time. The exception is a published release that already holds every asset, which is what an earlier publish leaves; the stage then does nothing.
latest goes in the reveal’s request that publishes the draft, so a release never shows as latest, or stops another being latest, while it is incomplete. A release that was already published when the stage ran is left as it is, latest included.
notes gives the release its body on GitHub and Forgejo and its description on GitLab (#4658). heading names the line the section starts after, such as ## In {version} for a changes page or ## [{version}] for a changelog, with {label}, {version} (the label from its first digit) and {tag} filled in. A heading matches when the line is the pattern, or the pattern and then a space, so ## [1.4.0] - 2026-11-07 matches ## [{version}] and ## 1.4.0-rc.1 does not match ## {version}. The section runs to the next heading of the same level or higher, and a # line inside a fenced code block is not a heading. Links that start with / are made absolute against linkBase. before and after are paragraphs put around the section, with the same placeholders.
{ type: "forge", forge: "github", repo: "acme/api", assets: ["dist/api-linux.tar.gz"], notes: { file: "docs/changes.md", heading: "## In {version}", linkBase: "https://docs.acme.dev", after: "Every release is on the [changes page](https://docs.acme.dev/changes/)." } }The file is read when the publish plans its targets, so a missing file or section, or an empty one, stops the publish with publish-forge-notes-missing before any target stages. file and heading go together. On Forgejo, which has no setting for the latest release and takes the newest one that is not a prerelease, a release cut with --channel is published as a prerelease. A release of notes alone attaches the SBOM unless sbom is false, and no provenance statement, since it has no assets.
Generated notes
Section titled “Generated notes”generate adds notes made for the release after the file’s section, or on their own when there is no file (#5153). The body is before, the section, the generated notes, then after, with a blank line between each.
generate | Notes |
|---|---|
commits | chant’s own, from the conventional commits in the member’s directory since the member’s previous release, merges left out. A ### heading for each of breaking changes, features, fixes and other changes, and under it one line per commit: its scope, its description and its short sha. types lists the commit types to include, default ["feat", "fix", "perf"], and "*" lists every type. exclude, in place of types, lists every commit except those types, as goreleaser’s changelog.filters.exclude does. A breaking change (type!: or a BREAKING CHANGE: footer) is listed whatever its type. A commit whose subject is not conventional goes under other changes: it is listed with exclude or "*" and left out with a list of types, and nonConventional: true or false decides it either way. The summaries of the intent files the release’s cut consumed come first, under ### Highlights, the highest level first, whatever types says |
forge | The forge’s own. GitHub: POST /repos/{repo}/releases/generate-notes for the tag at the release’s commit, with the previous release’s tag as previous_tag_name when the forge release uses the cut’s tag; otherwise GitHub picks the release to start from. GitLab: GET /projects/{id}/repository/changelog with version (the label from its first digit), to the release’s commit and from the previous release’s commit; GitLab lists only the commits that carry a Changelog: trailer. Forgejo has no such API, so the plan refuses with publish-forge-notes-unsupported |
{ type: "forge", forge: "github", repo: "acme/api", assets: ["dist/api-linux.tar.gz"], notes: { generate: "commits", types: ["feat", "fix", "perf", "revert"], before: "Install with `npm i @acme/api@{version}`." } }A project moving off goreleaser’s changelog keeps its filters with exclude:
{ type: "forge", forge: "github", repo: "acme/cli", assets: ["artifact:goreleaser"], notes: { generate: "commits", exclude: ["docs", "test", "chore"] } }The previous release is the one the cut finds: the member’s release cut from the nearest ancestor of this release’s commit. A member’s first release lists every commit in its directory. The commits come from the checkout’s git history, so the publish needs the full history (fetch-depth: 0 on actions/checkout, GIT_DEPTH: 0 on GitLab, as the generated release workflow sets); a shallow checkout, or a directory outside a git checkout, is refused with publish-forge-notes-history.
The stage decides the notes. GitHub and Forgejo get them on the draft, which is created with them or, when an earlier stage left it, edited to them, so the draft shows the notes before the reveal. They are kept in the publish record, and the reveal publishes those, so a resumed publish asks the forge nothing again and the release’s notes are the ones its draft showed. The dry run prints the notes from commits in full; the forge’s own are fetched only when the stage runs, so the dry run names them instead. A release already published when the stage ran keeps the notes it has.
A GitHub or Forgejo release whose label is a semver prerelease is published with prerelease: true. On GitHub it is also published with make_latest false, whatever latest says. GitLab’s release API has no prerelease setting, so a GitLab release is created as usual.
Homebrew tap
Section titled “Homebrew tap”A formula in a tap repository on GitHub, rendered from a template in the member with the release’s version and each asset’s URL and SHA-256 (#4676). Read by chant 0.124.63 and newer.
A homebrew target is the index target’s homebrew-tap preset, kept with its own fields and its own behaviour: it stages and reveals in the order declared, a refusal fails the publish, and each SHA-256 is of the file in the checkout. To have a tap updated after every other target, declare { type: "index", preset: "homebrew-tap", ... } in its place.
| Field | Meaning |
|---|---|
tap | The tap’s repository, owner/name, such as acme/homebrew-tap |
formula | The formula’s path in the tap, such as Formula/api.rb |
template | The formula with placeholders, relative to the member |
assets | The files the formula downloads, relative to the member, or artifact:<name> for every file the release records for that release.artifacts entry. The template names each by its file name, which must be unique |
url | Where each asset is downloaded from, with {tag} (the tag the cut made), {label}, {version} and {name} (the asset’s file name) filled in |
branch | The tap’s branch that brew installs from. Default: the repository’s default branch |
api | The GitHub API root. Default: $GITHUB_API_URL, else https://api.github.com |
tokenEnv | The variable holding a token that may push to the tap. Default HOMEBREW_TAP_TOKEN |
sshKeyEnv | The variable holding an SSH private key that may push to the tap, such as a deploy key. Set, the target pushes with git over SSH and reads no token. See Pushing over SSH |
The template is the formula as the tap should hold it, with these placeholders where a release changes it:
| Placeholder | Filled with |
|---|---|
{{version}} | The release’s label from its first digit on, so v1.4.0 and app-v1.4.0 are both 1.4.0. A release with no label, or a label with no digit, is refused (publish-homebrew-no-version) |
{{url:<name>}} | The url pattern for the asset whose file name is <name> |
{{sha256:<name>}} | The SHA-256 in hex of that asset’s file in the checkout, which must match the digest the release records for it |
{{label}}, {{tag}} | The release’s label, and the tag the cut made |
Any other placeholder, or an asset name that no declared asset has, is refused in the plan (publish-homebrew-template). The rest of the template is copied as it is, so a formula with on_macos and on_linux blocks, and on_arm and on_intel inside them, puts a url and sha256 pair in each:
class Api < Formula desc "The acme API" homepage "https://acme.example" version "{{version}}"
on_macos do on_arm do url "{{url:api-darwin-arm64.tar.gz}}" sha256 "{{sha256:api-darwin-arm64.tar.gz}}" end on_intel do url "{{url:api-darwin-amd64.tar.gz}}" sha256 "{{sha256:api-darwin-amd64.tar.gz}}" end end
on_linux do url "{{url:api-linux-amd64.tar.gz}}" sha256 "{{sha256:api-linux-amd64.tar.gz}}" end
def install bin.install "api" endendTo move a tap you already have, copy its formula into the member and put the placeholders in place of the version, the URLs and the hashes.
A tap is a branch that brew installs from and has no draft, so the stage commits to a branch next to it and the reveal moves the tap branch. The stage makes chant-publish/<formula>-<version> at the tap branch’s head, or moves it there when an earlier stage left it elsewhere, and commits the rendered formula to it through the contents API with the message <formula> <version>. brew reads only the tap branch, so nothing is visible. A tap branch that already holds the formula as rendered stages nothing, and a staging branch that already holds it is not committed to again. The reveal fast-forwards the tap branch to the staged commit and deletes the staging branch. If the tap branch moved since the stage, the fast-forward is refused, and the reveal commits the formula onto the branch instead, unless the branch already holds it. Either way the formula arrives in one commit.
The formula points at the url of each asset, so those must download by the time it is revealed. Declare the forge target that attaches them before this one: targets reveal in the order declared.
Pushing over SSH
Section titled “Pushing over SSH”With sshKeyEnv, the target writes the tap with git over SSH and the private key in that variable, in place of the API and a token (#4699). A deploy key reaches the one repository it was added to, where a classic token reaches every repository its user can. Read by chant 0.124.64 and newer. tokenEnv beside it is refused (publish-homebrew-auth-invalid).
{ type: "homebrew", tap: "acme/homebrew-tap", formula: "Formula/api.rb", template: "packaging/api.rb", assets: ["dist/api-linux-amd64.tar.gz"], url: "https://github.com/acme/api/releases/download/{tag}/{name}", sshKeyEnv: "HOMEBREW_TAP_KEY" },The remote is git@github.com:<tap>.git, or git@<host>:<tap>.git when api is a GitHub Enterprise Server’s root on <host>. The host’s keys are pinned: before each step chant reads ssh_keys from GET {api}/meta over HTTPS, writes them to a known-hosts file, and runs ssh with StrictHostKeyChecking=yes, IdentitiesOnly=yes, BatchMode=yes and no config file. The key is written to a file only the user can read, in a temporary directory that is removed after the step. git and ssh must be on PATH.
The steps are the ones above, in git. The stage lists the tap’s branches (git ls-remote), fetches the tap branch at depth 1, commits the formula on its head without a checkout, and force-pushes that commit to chant-publish/<formula>-<version>. The reveal fetches the staging branch and pushes its commit to the tap branch without force, which the remote takes only as a fast-forward. When the tap branch moved since the stage, or the staging branch no longer holds the staged commit, the reveal commits the formula onto the tap branch’s head and pushes that instead, unless the branch already holds the formula. Then it deletes the staging branch. Commits are made as the git identity the run has, else chant <chant@localhost>.
What the stage can’t check: whether the tap branch takes the push. The stage proves the key can push to the tap, since it pushes the staging branch, but a branch rule that refuses a deploy key, or a branch that moves again while the reveal commits onto it, shows only at the reveal (publish-homebrew-failed), after the targets before it revealed. A run of the same publish then reveals it again.
Index repositories
Section titled “Index repositories”Manifests in an index repository on GitHub that a package manager or a directory reads, such as krew-index, winget-pkgs, a Scoop bucket, homebrew-core, a Homebrew tap, Zed’s extensions or an Artifact Hub repository (#5158). Read by chant 0.124.101 and newer. The target renders each manifest from a template in the member, as the Homebrew tap does, and then either commits it to a repository the publisher may push to (mode: "commit") or proposes it in a pull request from a fork (mode: "pull-request").
{ type: "index", preset: "krew", name: "behold", template: "packaging/krew.yaml", assets: ["artifact:behold"], url: "https://github.com/acme/behold/releases/download/{tag}/{name}" },| Field | Meaning |
|---|---|
preset | krew, winget, scoop, homebrew-core, homebrew-tap, zed or artifacthub: the defaults below |
repo | The index repository, owner/name. Default: the preset’s, where it has one |
name | The package’s name in the index: the krew plugin, the winget PackageIdentifier, the Scoop app, the formula, the Zed extension id, the Artifact Hub package |
mode | commit or pull-request. Default: the preset’s, else pull-request |
template | One manifest template, relative to the member |
path | Where template goes in the index. Default: the preset’s path |
files | More manifests: each path in the index, and its template in the member |
assets | The files the manifests download: artifact:<name> for an entry of release.artifacts, or a path the release records |
url | Where each asset is downloaded from, with {tag}, {label}, {version} and {name} filled in, as for the tap. Needed with assets |
branch | The branch the index is read from, and the base of the pull request. Default: the repository’s default branch |
fork | pull-request only: the repository the pull request’s branch is pushed to. Default: the token’s user’s fork of repo, made when there is none. repo itself opens the pull request from a branch of repo |
title | The commit message and pull request title, with {name}, {version}, {label} and {tag}. Default: the preset’s, else {name} {version} |
body | The pull request’s body, with the same placeholders. Default Updates {name} to {version}, released as {tag}. |
api | The GitHub API root. Default: $GITHUB_API_URL, else https://api.github.com |
tokenEnv | The variable holding the token. Default HOMEBREW_TAP_TOKEN under homebrew-tap, else INDEX_TOKEN |
sshKeyEnv | commit only: the variable holding an SSH private key that may push to repo, such as a deploy key, as for the tap’s Pushing over SSH |
onRefusal | warn (the default) or fail. See When the index refuses |
| Preset | repo | mode | Manifest path | Title |
|---|---|---|---|---|
krew | kubernetes-sigs/krew-index | pull-request | plugins/{name}.yaml | Update {name} to {version} |
winget | microsoft/winget-pkgs | pull-request | none: list the version, installer and locale manifests under files | New version: {name} version {version} |
scoop | yours | commit | bucket/{name}.json | {name}: Update to version {version} |
homebrew-core | Homebrew/homebrew-core | pull-request | Formula/{letter}/{name}.rb | {name} {version} |
homebrew-tap | yours | commit | Formula/{name}.rb | {name} {version} |
zed | zed-industries/extensions | pull-request | none: see below | Update {name} to {version} |
artifacthub | yours | commit | {name}/{version}/artifacthub-pkg.yml | {name} {version} |
A path in the index may hold {name}, {version}, {label}, {letter} (the name’s first letter, lowercased) and {namePath} (the name with each . made a /). A path that names anything else, or leaves the repository, is refused (publish-index-path). winget’s manifests go under one directory:
{ type: "index", preset: "winget", name: "Acme.Behold", files: { "manifests/{letter}/{namePath}/{version}/{name}.yaml": "packaging/winget/version.yaml", "manifests/{letter}/{namePath}/{version}/{name}.installer.yaml": "packaging/winget/installer.yaml", "manifests/{letter}/{namePath}/{version}/{name}.locale.en-US.yaml": "packaging/winget/locale.yaml", }, assets: ["artifact:behold-windows"], url: "https://github.com/acme/behold/releases/download/{tag}/{name}",},The templates take the tap’s placeholders, {{version}}, {{label}}, {{tag}}, {{url:<asset>}} and {{sha256:<asset>}}, and two more: {{name}}, and {{commit}}, the release’s commit. Each {{sha256:<asset>}} is the SHA-256 the release records for that file. The target never reads or hashes the file again, so every asset must be one the release records: a path it does not record is refused (publish-index-asset-not-recorded). An unknown placeholder is refused in the plan (publish-index-template), and so is a release with no version (publish-index-no-version).
The zed preset needs no template. It sets version in the extension’s table of extensions.toml to the release’s version, leaving the table’s other keys as they are, and points the extensions/<name> submodule at the release’s commit, both in one commit. The index takes an extension’s first version by hand, so an extension with no table or no submodule there is refused (publish-index-not-listed).
A declaration that can’t publish is refused before anything runs (publish-index-invalid): no repo and no preset that gives one, template with no path under winget, a template under zed, sshKeyEnv with pull-request, or fork with commit.
Committing and opening the pull request
Section titled “Committing and opening the pull request”Under mode: "commit" the target takes the tap’s two steps: the stage commits the manifests to chant-publish/<name>-<version> at the branch’s head, and the reveal fast-forwards the branch to that commit and deletes the staging branch. One file goes through the contents API, as the tap’s formula does; more than one, or a submodule, go in one commit through the git data API. Over SSH, the steps run in git, as for the tap.
Under mode: "pull-request" the stage asks GitHub for the token’s user’s fork of the index, which GitHub makes when there is none, and waits up to a minute for a new fork to appear. It then commits the manifests to chant-publish/<name>-<version> on the fork, on the head of the index’s branch, in one commit. Nothing reaches the index. The reveal opens the pull request from that branch into the index’s branch, with the title and body declared, and records its URL as each item’s destination.
Each step asks before it writes. An index branch that already holds the manifests as rendered, such as one a bot updated, gets no commit and no pull request, and the items come back present. A staging branch that already holds them is not committed to again. Before opening a pull request the reveal looks for one from the same branch, in any state: an open or merged one is the release’s, and none is opened again. So a resume, whether its record line was written or not, opens one pull request. If the fork’s branch is gone, the reveal makes it again before it opens the pull request.
When the index refuses
Section titled “When the index refuses”An index target never reveals before every other target has revealed. It stages with the others, onto a branch no consumer reads, and reveals in the last group with the mcp-registry targets, in the order declared (see Staging and resuming). So the files a manifest points at are already downloadable when the commit lands or the pull request opens, and the dry run says so beside the target. A train publish reveals it last among its member’s targets, in that member’s layer.
The index often belongs to someone else. So by default a refusal from it is a warning (onRefusal: "warn"): a stage or reveal that fails prints a warning, a stage that fails skips the target’s reveal, the target comes back with a warning and its item refused: true in the --json document, and the publish succeeds. The target is not recorded as revealed, so the same chant release publish run again tries it again. A pull request the index closed without merging is such a refusal (publish-index-pr-closed): a run of the same publish opens no new one while it is closed. With onRefusal: "fail", a refusal fails the publish with its code, such as publish-index-failed for a request GitHub refused: at the stage, before any target reveals; at the reveal, after every other target revealed. A run of the same publish resumes at this target. Either way, what the plan finds, such as a missing token or a template it can’t fill, stops the publish before any target runs.
The token must be able to do what the mode needs. For commit, write access to repo, as for the tap. For pull-request, a classic token with the public_repo scope may fork the index, push to the fork and open the pull request. chant release doctor checks each.
Editor marketplaces
Section titled “Editor marketplaces”A packaged .vsix on the VS Code Marketplace or on Open VSX (#4676). Declare one target per marketplace. Read by chant 0.124.63 and newer.
{ type: "marketplace", marketplace: "vscode", vsix: "dist/acme.vsix" },{ type: "marketplace", marketplace: "openvsx", vsix: "dist/acme.vsix" },| Field | Meaning |
|---|---|
marketplace | vscode or openvsx |
vsix | The .vsix that vsce package wrote, relative to the member. The extension’s publisher, name and version are read from extension/package.json inside it |
registry | Open VSX’s root, default https://open-vsx.org, or the VS Code Marketplace’s gallery, default https://marketplace.visualstudio.com |
tokenEnv | The variable holding the token, under auth: "token". Default VSCE_PAT for the VS Code Marketplace and OVSX_PAT for Open VSX, the variables vsce and ovsx read |
auth | token (the default), azure-credential (VS Code Marketplace) or trusted-publishing (Open VSX). See The run’s identity |
onRefusal | fail (the default) or warn. See A refusal as a warning |
A .vsix that the release records as an asset must match its digest, as with any target. A file that is not a zip with an extension/package.json naming publisher, name and version is refused in the plan (publish-marketplace-vsix-invalid).
A marketplace has no draft. A version is visible as soon as it is uploaded, and a version can’t be uploaded twice. So the stage uploads nothing: it checks what it can without changing anything, and the reveal uploads. If another target fails to stage, nothing has reached a marketplace. A marketplace that refuses the upload fails at the reveal, after the targets declared before it have revealed, so declare the marketplaces last.
| Marketplace | Stage | Reveal |
|---|---|---|
| Open VSX | Reads the namespace (GET /api/{namespace}), and refuses a missing one with publish-marketplace-no-namespace. Reads the version (GET /api/{namespace}/{name}/{version}). A version already there is present when the SHA-256 of what Open VSX serves for it is the file’s, and is refused with publish-marketplace-version-exists otherwise | Sends the file with POST /api/-/publish, then downloads what Open VSX serves for the version and refuses a digest that differs (publish-marketplace-digest-mismatch). A version already there, as after a run whose record was lost, is checked the same way and not sent again |
| VS Code Marketplace | Asks the gallery’s public extensionquery API for the extension’s versions. A version already listed is present, by version only, since the gallery reports no digest | Runs vsce publish --packagePath <vsix> with the token in VSCE_PAT, unless the gallery lists the version by then |
The VS Code Marketplace target needs vsce on PATH, such as from npm install -g @vscode/vsce. vsce’s output goes through the redactor. Open VSX takes its token as a query parameter, which the redactor masks in any error that quotes the request.
The run’s identity
Section titled “The run’s identity”A target can publish with the CI run’s identity in place of a stored token (#4698), as vsce publish --azure-credential and ovsx publish --trusted-publishing do. Read by chant 0.124.64 and newer. tokenEnv beside either is refused, and so is an auth the marketplace doesn’t take (publish-marketplace-auth-invalid).
{ type: "marketplace", marketplace: "vscode", vsix: "dist/acme.vsix", auth: "azure-credential" },{ type: "marketplace", marketplace: "openvsx", vsix: "dist/acme.vsix", auth: "trusted-publishing", onRefusal: "warn" },auth | Where the identity comes from | Stage | Reveal |
|---|---|---|---|
azure-credential | The job’s Microsoft Entra sign-in, which vsce finds through the Azure CLI, a managed identity or AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_CLIENT_SECRET. In GitHub Actions, azure/login with the run’s OIDC token, in the same job and before the publish | Runs vsce verify-pat --azure-credential <publisher>, which signs in and asks the marketplace for the identity’s role on the publisher, and changes nothing. A failure is publish-marketplace-azure-credential | Runs vsce publish --packagePath <vsix> --azure-credential |
trusted-publishing | The run’s OIDC ID token: in GitHub Actions, one requested with the registry’s root as its audience from a job with permissions: id-token: write; elsewhere, the token in OVSX_ID_TOKEN. With neither, the plan refuses with publish-credentials-missing | Exchanges the ID token at POST /api/-/trusted-publishing/token for a publishing token, to check that Open VSX takes this workflow as a trusted publisher of the extension, and drops the token. A refusal is publish-marketplace-trusted-publishing | Exchanges the ID token again, since a publishing token lasts minutes, and uploads with it |
Neither reads VSCE_PAT or OVSX_PAT. vsce runs with VSCE_PAT taken out of its environment, since vsce uses a PAT it finds there before --azure-credential. The trusted publisher is registered once on Open VSX, under the extension’s trusted publishers at {registry}/user-settings/trusted-publishers; the Entra identity is added once to the publisher as a member.
What the stage can’t check: whether the upload itself will be taken. The stage proves the identity can sign in and is known to the publisher or the extension, and the reveal signs in again. An Entra sign-in that has lapsed between the two, or a store that refuses the file, still fails at the reveal, after the targets before it revealed.
A refusal as a warning
Section titled “A refusal as a warning”With onRefusal: "warn", a marketplace that refuses the reveal’s upload, or a request the reveal makes around it (publish-marketplace-failed, publish-marketplace-trusted-publishing), doesn’t fail the publish (#4698). Read by chant 0.124.64 and newer. The publish prints a warning, the target’s items come back with refused: true and the target with a warning in the --json document, and the next target reveals. The target is not recorded as revealed, so the same chant release publish run again tries the upload again.
The stage’s checks still refuse under warn: a missing namespace, a version already there with other bytes, a missing credential, an identity that can’t sign in. So do a vsce that is not on PATH (publish-marketplace-vsce-missing) and a digest that differs after an upload. warn is for a store that refuses a release it should take, as Open VSX has with a 406 for some extensions.
Tauri updater
Section titled “Tauri updater”The updater manifest a Tauri v2 app reads, latest.json, and a rolling GitHub release under a fixed tag that holds it with the app’s bundles, replaced on each publish (#4676). The app’s updater endpoint is the manifest’s download URL on that release, such as https://github.com/acme/app/releases/download/app-latest/latest.json. The release-per-version, if there is one, is a forge target’s. Read by chant 0.124.63 and newer.
{ type: "tauri-updater", repo: "acme/app", tag: "app-latest", platforms: { "darwin-aarch64": "dist/Acme_aarch64.app.tar.gz", "darwin-x86_64": "dist/Acme_x64.app.tar.gz", "linux-x86_64": "dist/Acme_1.4.0_amd64.AppImage", "windows-x86_64": "dist/Acme_1.4.0_x64-setup.exe", }, assets: ["dist/Acme_1.4.0_aarch64.dmg", "dist/Acme_1.4.0_x64_en-US.msi"], notes: "dist/NOTES.md",}| Field | Meaning |
|---|---|
repo | The GitHub repository, owner/name |
tag | The rolling release’s tag, such as app-latest |
platforms | Each updater platform (<os>-<arch> such as darwin-aarch64, or <os>-<arch>-<installer> such as windows-x86_64-nsis) and its updater bundle, relative to the member. The bundle’s signature is the .sig file beside it that the Tauri build wrote |
assets | More files the rolling release holds, such as the installers the site links to |
notes | A file whose text is the manifest’s notes. Without it the manifest has none |
url | Each platform’s url in the manifest, with {tag} (the rolling tag), {label}, {version} and {name} (the bundle’s file name) filled in. Default: the bundle’s download URL on the rolling release on github.com |
manifest | The manifest’s asset name. Default latest.json |
latest | GitHub’s make_latest for the rolling release: true, false or "legacy". Default false, so the rolling release never becomes the repository’s latest |
api | The GitHub API root. Default: $GITHUB_API_URL, else https://api.github.com |
tokenEnv | The variable holding the token. Default GITHUB_TOKEN |
The manifest is Tauri’s static JSON. version is the release’s label from its first digit on, so app-v1.4.0 is 1.4.0, and a release whose label has no digit is refused (publish-tauri-no-version). pub_date is the time of the cut whose signature the publish carries, so the manifest is the same bytes on every run, and is left out when no cut is known. Each platform’s signature is the text of its .sig file. Every bundle, .sig file and asset that the release records must match its digest.
{ "version": "1.4.0", "notes": "Faster sync.", "pub_date": "2026-10-17T10:00:00.000Z", "platforms": { "darwin-aarch64": { "signature": "dW50cnVzdGVkIGNvbW1lbnQ6...", "url": "https://github.com/acme/app/releases/download/app-latest/Acme_aarch64.app.tar.gz" } }}GitHub can’t replace what a release holds in one request, so the stage builds a new release as a draft and the reveal swaps it in. The stage makes a draft for the rolling tag named <tag> <version> at the release’s commit, or finds the one an earlier stage made, and uploads each bundle, each asset and the manifest to it. A file already on the draft with the same digest is not sent again, and one that differs is refused (publish-tauri-asset-exists). The published rolling release is untouched, so the updater sees nothing new. A rolling release that already holds every file with the same digests is what an earlier reveal left, and the stage then does nothing.
The reveal deletes the published rolling release and its tag, then publishes the draft with make_latest. GitHub makes the tag again at the release’s commit when it publishes. Between the delete and the publish, a few requests apart, the rolling release’s URLs answer 404. The updater treats that as no update, and the site’s download links fail for that moment. A reveal run again after the draft was published finds it published and does nothing.
Python wheels and sdists on PyPI, TestPyPI, or another index that takes PyPI’s upload API (#5167). Read by chant 0.124.101 and newer.
{ type: "pypi", files: ["dist"] },{ type: "pypi", files: ["artifact:python"], index: "testpypi" },{ type: "pypi", files: ["dist"], uploadUrl: "https://pypi.acme.dev/legacy/", simpleUrl: "https://pypi.acme.dev/simple/", tokenEnv: "ACME_PYPI_TOKEN", usernameEnv: "ACME_PYPI_USER" },| Field | Meaning |
|---|---|
files | The distributions, relative to the member: a .whl, .tar.gz or .zip file, a directory (every such file in it, in name order), or artifact:<name> for every file the release records for that release.artifacts entry |
index | pypi (the default) or testpypi |
uploadUrl and simpleUrl | Another index: its upload URL and its simple API root. They go together, and not with index |
auth | token or trusted-publishing. Unset: a token when the token’s variable is set, else trusted publishing when the run has an OIDC ID token |
tokenEnv | The variable holding the API token. Default PYPI_TOKEN, or TEST_PYPI_TOKEN for TestPyPI |
usernameEnv | The variable holding the user the token is sent as. Default: the user __token__, which PyPI’s API tokens take |
sbom | false publishes wheels that carry no SBOM under the supply-chain group. See The SBOM |
attestations | false uploads no PEP 740 attestation. Default true |
The project’s name and version come from each file’s own metadata: .dist-info/METADATA in a wheel, PKG-INFO in an sdist. The upload sends that metadata in the form fields twine sends. A file that is neither, or whose metadata has no Metadata-Version, Name and Version, is refused in the plan (publish-pypi-not-a-distribution), as is a directory with no distribution in it (publish-pypi-no-files) and a file name given twice (publish-pypi-duplicate-file). A file the release records must match its digest.
An index has no draft. A file is visible as soon as it is uploaded, and a file name can never be uploaded again, even after it is deleted. So the stage uploads nothing, and the reveal uploads, as with a marketplace. Nothing of this target is out between the two steps, so a check of what staged can’t see it. If another target fails to stage, nothing has reached the index. It reveals after every target whose reveal only moves a tag or publishes a draft, wherever it is declared (see Staging and resuming).
| Step | What it does |
|---|---|
| Stage | Reads the project from the simple API, as JSON (PEP 691) or HTML (PEP 503). A file the index serves with the same SHA-256 is present, and one it serves with other bytes is refused (publish-pypi-file-exists). With trusted publishing, makes the token exchange below and drops the token. With a token, there is no read-only check, so the stage says so |
| Reveal | Reads the simple API again, then uploads each file it does not serve to the upload URL with :action=file_upload, the file’s metadata, its SHA-256 and its attestations. A file the index already holds with the same bytes, as after a run whose record was lost, is not sent again. A failure part way names the files uploaded before it, and the same publish run again uploads only the rest |
Trusted publishing on PyPI
Section titled “Trusted publishing on PyPI”With auth: "trusted-publishing", PyPI or TestPyPI hands the run a short-lived upload token for its OIDC ID token, with no stored secret. The target reads the audience at {index}/_/oidc/audience, gets an ID token for it (in GitHub Actions from a job with permissions: id-token: write; elsewhere from PYPI_ID_TOKEN, which a GitLab job declares under id_tokens with aud: pypi, or testpypi for TestPyPI), and exchanges it at {index}/_/oidc/mint-token. The stage makes the exchange to check that the index takes this workflow as a trusted publisher, and the reveal exchanges again, since the token lasts minutes. A refusal is publish-pypi-trusted-publishing, with the index’s reason. Register the workflow once on the project’s publishing settings, or as a pending publisher for a project that does not exist yet. Another index takes a token only, and auth: "trusted-publishing" beside uploadUrl fails validation.
Attestations on PyPI
Section titled “Attestations on PyPI”PyPI keeps PEP 740 attestations with each file. The target uploads the attestations beside each file, <file>.<name>.attestation, such as pypi-attestations sign writes. With Sigstore signing on and trusted publishing, the stage signs a publish attestation for each file that has none: an in-toto statement naming the file and its SHA-256, with the predicate type https://docs.pypi.org/attestations/publish/v1, signed with cosign attest-blob and made into PyPI’s attestation form. The stage keeps it in the publish record’s state, so a resumed reveal uploads the same attestation. PyPI takes attestations only from a trusted publisher, so under a token nothing is signed, and the stage says so. A file that is not a JSON object beside a distribution is refused (publish-pypi-attestation-invalid).
Cargo registries
Section titled “Cargo registries”Rust crates on crates.io or another Cargo registry, published with cargo publish (#5167). Read by chant 0.124.101 and newer.
{ type: "cargo" },{ type: "cargo", crates: ["acme-core", "acme-cli"], manifest: "rust/Cargo.toml" },{ type: "cargo", registry: "acme", index: "sparse+https://cargo.acme.dev/index/" },| Field | Meaning |
|---|---|
manifest | The Cargo.toml of the workspace or the crate, relative to the member. Default Cargo.toml |
crates | The crates to publish, by package name. Default: every workspace member whose publish allows the registry |
registry | A registry named in the project’s .cargo/config.toml, passed as --registry. Default: crates.io. Needs index |
index | The registry’s sparse index, which the stage and the reveal read. Default: crates.io’s, https://index.crates.io/ |
api | crates.io’s root for trusted publishing. Default https://crates.io |
auth | token or trusted-publishing. Unset: a token when the token’s variable is set, else trusted publishing when the run has an OIDC ID token |
tokenEnv | The variable holding the token. Default CARGO_REGISTRY_TOKEN, or CARGO_REGISTRIES_<NAME>_TOKEN with registry, the variables cargo reads. chant hands the token to cargo in the variable cargo reads for the registry |
sbom | false publishes under the supply-chain group, which otherwise refuses this target. See The SBOM |
The plan runs cargo metadata --no-deps on the manifest to read the crates, their versions and their dependencies. The version published is the one in each Cargo.toml; release.version can stamp it with the release’s label. The crates go in dependency order: each after the selected crates it depends on, through normal, build and dev dependencies, ties in name order. A dev-dependency with no version is left out of the order, since cargo drops it from what it publishes. The plan refuses a crate crates names that the workspace does not have (publish-cargo-unknown-crate) or whose publish leaves out the registry (publish-cargo-unpublishable), a workspace with nothing to publish (publish-cargo-no-crates), a dependency on a workspace crate by path with no version, which cargo would refuse (publish-cargo-dependency-version), and crates that depend on each other (publish-cargo-cycle). With no cargo on PATH it stops with publish-cargo-missing.
A registry has no draft. A crate version is visible as soon as it is published and can never be published again, so the reveal publishes, as on PyPI.
| Step | What it does |
|---|---|
| Stage | Reads each crate’s file in the sparse index. A version already there is present, with the index’s checksum as its digest. With trusted publishing, exchanges a token and revokes it. With a token, there is no read-only check, so the stage says so |
| Reveal | For each crate in order, reads the index again, and when the version is not there runs cargo publish -p <crate> --manifest-path <manifest> --no-verify --allow-dirty, with --registry for another registry. cargo waits until the index serves the version before it returns, so the next crate resolves it. A failure names the crates published before it (publish-cargo-failed), and the same publish run again publishes only the rest |
--no-verify because a publish never builds: the build belongs to the cut. --allow-dirty because the checkout carries the stamped versions, which the publish’s own check of the checkout already allows. cargo’s output goes through the redactor. A crate’s first version needs a token that may publish new crates.
Trusted publishing on crates.io
Section titled “Trusted publishing on crates.io”With auth: "trusted-publishing", crates.io hands the run a token for its OIDC ID token: one GitHub Actions issues with the audience crates.io (a job with permissions: id-token: write), or the value of CRATES_IO_ID_TOKEN. The target exchanges it at POST {api}/api/v1/trusted_publishing/tokens and revokes the token with a DELETE when the step ends. The stage makes the exchange to check that crates.io takes this workflow as a trusted publisher of the crates, and the reveal exchanges again. A refusal is publish-cargo-trusted-publishing. Add the repository and workflow once to each crate’s trusted publishers on crates.io. A crate’s first version can’t be published this way. Another registry takes a token only.
Helm charts
Section titled “Helm charts”Helm chart archives pushed to an OCI registry, and listed in a chart repository’s index.yaml on a branch of a GitHub repository, such as the gh-pages branch GitHub Pages serves. PUBLISH_HELM_FLOOR is the first chant with this target.
{ type: "helm", charts: ["artifact:chart"], oci: { repository: "ghcr.io/acme/charts" } },{ type: "helm", charts: ["artifact:chart"], index: { repo: "acme/charts", url: "https://github.com/acme/api/releases/download/{tag}/{name}" } },| Field | Meaning |
|---|---|
charts | The chart archives, relative to the member: a .tgz as helm package writes it, or artifact:<name> for a helm entry of release.artifacts |
oci.repository | <registry host>/<path>. Each chart goes to <repository>/<chart name>, as helm push puts it |
oci.usernameEnv and oci.passwordEnv | The registry’s credentials, read as the oci target reads them. Default OCI_USERNAME and OCI_PASSWORD, else the docker config |
index.repo | The GitHub repository the chart repository is served from, owner/name |
index.branch | The branch. Default gh-pages |
index.path | The index’s path on the branch. Default index.yaml |
index.url | Where each chart is downloaded from, with {tag}, {label}, {version} and {name} (the archive’s file name) filled in, such as the asset URL of a forge target that attaches the chart. Unset: each archive is committed beside the index, and the index names it by its file name, which helm reads relative to the repository’s URL |
index.api | The GitHub API root. Default $GITHUB_API_URL, else https://api.github.com |
index.tokenEnv | The variable holding a token that may push to the branch. Default GITHUB_TOKEN |
A target needs oci, index or both. The name, version and the rest of each chart’s Chart.yaml are read from the archive; a file that is not a chart archive is refused (publish-helm-not-a-chart), and so is a chart whose version is not the release’s label from its first digit (publish-helm-version-mismatch).
| Step | oci | index |
|---|---|---|
| Stage | Pushes the chart by digest as helm push lays it out: a manifest whose config is the chart’s metadata (application/vnd.cncf.helm.config.v1+json) and whose layer is the archive (application/vnd.cncf.helm.chart.content.v1.tar+gzip). The manifest holds no time, so the same chart is the same digest, and a registry that holds it is sent nothing | Reads the index on the branch, adds an entry for each chart (its Chart.yaml with urls, created and digest, as helm repo index writes them), and commits the index, with the archives when there is no url, to chant-publish/helm-<version> at the branch’s head. An index that lists each chart already is present |
| Reveal | Tags the digest with the chart’s version (+ written _, as helm does), which helm install oci://<repository>/<name> --version <version> reads | Fast-forwards the branch to the staged commit, or commits onto the branch when it moved since, then deletes the staging branch |
The index is added to, never rewritten: the versions it lists stay. A version it lists with another digest is refused (publish-helm-version-taken), since a chart version is never replaced. A branch that does not exist is refused; create it once, such as an empty gh-pages. With index, the target reveals after every other target, since the index points at files they make downloadable.
On GitHub, a helm target whose oci.repository is on ghcr.io and names no credentials pushes with the job’s token, as an oci target does: chant release workflow adds packages: write. chant release doctor checks the registry’s credentials as it does for an oci target (oci-* checks), and the index’s token and whether it sees the repository (helm-index-credentials, helm-index-access).
Linux packages
Section titled “Linux packages”Debian, RPM and other Linux packages are built at the cut by an nfpm entry of release.artifacts, and published by a forge target that names them, assets: ["artifact:<name>"]. They are attached to the forge release like any other asset. An apt or yum repository is not written.
Maven Central
Section titled “Maven Central”Maven components on Maven Central, uploaded to the Central Portal as a bundle (#5232).
{ type: "maven", bundle: "artifact:maven" },{ type: "maven", bundle: "target/staging-deploy" },| Field | Meaning |
|---|---|
bundle | The bundle, relative to the member: a .zip in Maven repository layout, a directory in that layout, or artifact:<name> for the one .zip the release records for that release.artifacts entry |
api | The Central Portal’s root. Default https://central.sonatype.com |
repository | The repository the stage reads for components already published. Default https://repo1.maven.org/maven2/ |
usernameEnv | The variable holding the user token’s name. Default MAVEN_CENTRAL_USERNAME |
passwordEnv | The variable holding the user token’s password. Default MAVEN_CENTRAL_PASSWORD |
sbom | false publishes under the supply-chain group components that carry no SBOM. See The SBOM |
A component is a <group path>/<artifactId>/<version>/<artifactId>-<version>.pom and the files beside it, such as mvn deploy -DaltDeploymentRepository=local::file:./target/staging-deploy writes them. A directory is zipped by chant, which adds a .md5 and a .sha1 for each file that has none. chant signs nothing: a file without its .asc beside it is refused in the plan (publish-maven-unsigned), as is a bundle with no component (publish-maven-no-components), a -SNAPSHOT version (publish-maven-snapshot), and an artifact: entry that records more than one file (publish-maven-bundle). A file the release records must match its digest.
The Portal holds a deployment it has validated until someone publishes it, so this target stages as an OCI or forge target does: nothing is visible until the reveal.
| Step | What it does |
|---|---|
| Stage | Reads each component’s .pom from the repository. When every one is there with the same bytes, the target is present and nothing is uploaded; a .pom with other bytes, or a bundle only part of which is published, is refused (publish-maven-version-exists). Otherwise uploads the bundle to POST {api}/api/v1/publisher/upload with publishingType=USER_MANAGED, and asks the deployment’s status every 10 seconds until the Portal says VALIDATED, for up to 30 minutes (publish-maven-validation-timeout). FAILED is refused with the Portal’s errors (publish-maven-invalid), and the deployment stays in the Portal to be read and dropped there. The deployment’s id goes in the publish record |
| Reveal | Publishes the recorded deployment with POST {api}/api/v1/publisher/deployment/<id>. A deployment already PUBLISHING or PUBLISHED is not sent again, and one the Portal no longer has is refused (publish-maven-deployment-missing). The repository serves what was published within about half an hour |
The user token comes from the Central Portal’s account page and is sent as Authorization: Bearer <base64 of name:password>; the Portal has no trusted publishing. Its account must own the namespace of each component’s groupId.
.nupkg packages on nuget.org, or on another feed that takes NuGet’s push API (#5232).
{ type: "nuget", packages: ["artifact:nuget"] },{ type: "nuget", packages: ["dist/nuget"], pushUrl: "https://nuget.acme.dev/api/v2/package", flatContainerUrl: "https://nuget.acme.dev/v3/flatcontainer/", tokenEnv: "ACME_NUGET_KEY" },| Field | Meaning |
|---|---|
packages | The packages, relative to the member: a .nupkg file, a directory (every .nupkg in it, in name order), or artifact:<name> |
pushUrl and flatContainerUrl | Another feed: its push URL and its package base address (flat container). They go together. Default: nuget.org’s |
auth | token or trusted-publishing. Unset: a token when the key’s variable is set, else trusted publishing when the run has an OIDC ID token |
tokenEnv | The variable holding the API key. Default NUGET_API_KEY |
userEnv | The variable holding the nuget.org user, by profile name and not email, whose trusted publishing policy names the workflow. Default NUGET_USER |
sbom | false publishes under the supply-chain group packages that carry no SBOM. See The SBOM |
The id and version come from the .nuspec at each package’s root. A file that is not a zip with one is refused in the plan (publish-nuget-not-a-package), as is a directory with no package (publish-nuget-no-files) and a file name given twice (publish-nuget-duplicate-file). .snupkg symbol packages are not pushed.
A feed has no draft: a version is listed once it is pushed and validated, and an id and version can never be pushed again. So the stage pushes nothing, and the reveal pushes, as on PyPI.
| Step | What it does |
|---|---|
| Stage | Reads {flatContainerUrl}<id>/index.json. A version the feed lists is present. nuget.org signs every package it takes, so the bytes it serves are not the bytes pushed, and no digest is compared. With trusted publishing in GitHub Actions, makes the exchange below and drops the key. With a key, there is no read-only check, so the stage says so |
| Reveal | Reads the flat container again, then pushes each package it does not list with PUT {pushUrl}, the package as the first part of a multipart body, the key in X-NuGet-ApiKey and X-NuGet-Protocol-Version: 4.1.0. A push answered 409, as for a version pushed moments ago that the flat container does not list yet, is present. 400 is publish-nuget-invalid. A failure part way names the packages pushed before it, and the same publish run again pushes only the rest |
Trusted publishing on nuget.org
Section titled “Trusted publishing on nuget.org”With auth: "trusted-publishing", nuget.org hands the run an API key that lasts an hour for its OIDC ID token, with no stored key. The target gets an ID token with the audience https://www.nuget.org (in GitHub Actions from a job with permissions: id-token: write; elsewhere from NUGET_ID_TOKEN, which a GitLab job declares under id_tokens) and posts it to https://www.nuget.org/api/v2/token with the user in userEnv. nuget.org takes an ID token once. GitHub Actions issues a new one each time it is asked, so there the stage makes the exchange to check that nuget.org takes the workflow, and the reveal exchanges again. With NUGET_ID_TOKEN the stage does not exchange, and the reveal’s exchange is the only one. A refusal is publish-nuget-trusted-publishing. Add the policy once under the user’s Trusted Publishing settings on nuget.org. Another feed takes a key only, and auth: "trusted-publishing" beside pushUrl fails validation.
RubyGems
Section titled “RubyGems”.gem files on RubyGems.org, or on another host that takes its API (#5232).
{ type: "rubygems", gems: ["artifact:gem"] },{ type: "rubygems", gems: ["pkg"], auth: "token" },| Field | Meaning |
|---|---|
gems | The gems, relative to the member: a .gem file, a directory (every .gem in it, in name order), or artifact:<name> |
host | Another host. Default https://rubygems.org |
auth | token or trusted-publishing. Unset: a token when the key’s variable is set, else trusted publishing when the run has an OIDC ID token |
tokenEnv | The variable holding the API key. Default GEM_HOST_API_KEY, the one gem push reads |
sbom | false publishes under the supply-chain group, which otherwise refuses this target. See The SBOM |
The name, version and platform come from each gem’s own metadata.gz. A file that is not a gem chant can read is refused in the plan (publish-rubygems-not-a-gem), as is a directory with no gem (publish-rubygems-no-files) and a file name given twice (publish-rubygems-duplicate-file).
A host has no draft: a version is visible once it is pushed, and a version can never be pushed again, even after a yank. So the stage pushes nothing, and the reveal pushes.
| Step | What it does |
|---|---|
| Stage | Reads {host}/api/v1/versions/<name>.json. A version the host lists for the gem’s platform with the same SHA-256 is present, and one with another is refused (publish-rubygems-version-exists). With trusted publishing, makes the exchange below and drops the key. With a key, there is no read-only check, so the stage says so |
| Reveal | Reads the versions again, then pushes each gem the host does not list with POST {host}/api/v1/gems, the gem as the body and the key in Authorization. A push the host refuses as a repush is present when it lists the same bytes. An account that asks for a one-time password on API pushes refuses the push, and the fix says so. A failure part way names the gems pushed before it, and the same publish run again pushes only the rest |
Trusted publishing on RubyGems.org
Section titled “Trusted publishing on RubyGems.org”With auth: "trusted-publishing", RubyGems.org hands the run a short-lived API key for its OIDC ID token: one GitHub Actions issues with the audience rubygems.org (a job with permissions: id-token: write), or the value of RUBYGEMS_ID_TOKEN. The target exchanges it at POST {host}/api/v1/oidc/trusted_publisher/exchange_token. The stage makes the exchange to check that RubyGems.org takes this workflow as a trusted publisher, and the reveal exchanges again. A refusal is publish-rubygems-trusted-publishing. Add the repository and workflow once to the gem’s trusted publishers on RubyGems.org, or as a pending trusted publisher for a gem that does not exist yet. Another host takes a key only.
MCP Registry
Section titled “MCP Registry”A server.json on the official MCP Registry, so MCP clients can find the server. A server.json names the npm packages, PyPI packages or OCI images that run the server, and the registry checks that they exist, so this target reveals after every other target, the PyPI, Cargo, NuGet, RubyGems and marketplace uploads among them, whatever its place in release.publish. It shares the last turn with index targets, and those reveal in the order declared. Read by chant 0.124.101 and newer.
{ type: "npm", packages: ["packages/mcp"] },{ type: "oci", image: "dist/mcp.oci.tar", repository: "ghcr.io/acme/mcp" },{ type: "mcp-registry" },| Field | Meaning |
|---|---|
server | The server.json, relative to the member. Default server.json |
registry | The registry’s root. Default https://registry.modelcontextprotocol.io |
auth | github-oidc (the default), github-token or registry-token |
tokenEnv | The variable holding the token under github-token (default MCP_GITHUB_TOKEN) or registry-token (default MCP_REGISTRY_TOKEN). Refused beside github-oidc (publish-mcp-registry-auth-invalid) |
The file must belong to the release. Its version must be the release’s label from its first digit (1.4.0 for v1.4.0), and so must the version of each package, and the tag of each OCI image (a digest is accepted). A file for another version is refused in the plan with publish-mcp-registry-version-mismatch, and a package that doesn’t match with publish-mcp-registry-package-mismatch, so a release can’t publish a listing for another version. A file that is not JSON, or has no name and version, is publish-mcp-registry-server-invalid. release.version.files stamps the label into server.json at the cut.
The registry has no draft, and a version it holds can’t be replaced. So the stage sends nothing that changes the registry. It exchanges for a registry token to prove the credentials work, and reads GET /v0.1/servers/{name}/versions/{version}. A version already there with the packages the file names is present, and one with other packages is refused with publish-mcp-registry-version-exists. The reveal exchanges again, since a registry token lasts minutes, sends POST /v0.1/publish with the file as the body, and reads the version back (publish-mcp-registry-not-served when the registry does not serve it). A registry that refuses the publish fails with its reason (publish-mcp-registry-failed), and one that refuses the exchange with publish-mcp-registry-auth.
auth | Credential | Exchange |
|---|---|---|
github-oidc | The GitHub Actions OIDC token of a job with permissions: id-token: write, requested with the registry’s origin as its audience. Without it the plan refuses with publish-credentials-missing | POST /v0.1/auth/github-oidc |
github-token | A GitHub token in tokenEnv. To publish under an organization’s namespace the token must let the registry read the user’s organization role | POST /v0.1/auth/github-at |
registry-token | A registry token in tokenEnv, such as one mcp-publisher login dns or login http produced for a domain namespace | none |
GitHub authentication grants the namespace io.github.<owner>/*, so a server published with github-oidc is named io.github.<owner>/<name> for the repository’s owner. A domain namespace needs a DNS or HTTP login, which registry-token carries into the publish.
chant makes these requests itself and runs no mcp-publisher. The requests are the ones mcp-publisher login github-oidc and mcp-publisher publish make, from the registry’s OpenAPI document, its GitHub Actions guide and its authentication guide.
Prereleases
Section titled “Prereleases”A release whose label is a semver prerelease (1.4.0-rc.1, v2.0.0-beta.3) is a prerelease on every target, with no --channel. The label is read as MAJOR.MINOR.PATCH-PRERELEASE, with an optional leading v and an optional +build suffix. A label that is not of this form, such as a date or v1, is not a prerelease.
| Target | A prerelease label |
|---|---|
npm | Reveals under the dist-tag named by the first identifier of the prerelease, lowercased: rc for 1.4.0-rc.1, beta for 2.0.0-beta.3. A number (1.0.0-3) or latest gives next. latest does not move |
oci | Pushes the declared tags without latest. The label tag stays |
forge | GitHub and Forgejo mark the release a prerelease, and GitHub does not make it latest. GitLab has no such setting |
homebrew | Skipped. The formula is what brew upgrade installs, so the target changes nothing and the dry run says it is skipped |
tauri-updater | Skipped, as the updater feed is what installed apps update from |
index | Skipped, as an index serves releases |
marketplace | Unchanged. A pre-release is a property of the packaged .vsix |
pypi | Unchanged. A PEP 440 prerelease version, such as 1.4.0rc1 in the file’s metadata, is one pip installs only when asked |
cargo | Unchanged. A semver prerelease in Cargo.toml is one cargo resolves only when a requirement names it |
maven | Unchanged. Maven Central publishes a version with a qualifier, such as 1.4.0-rc.1, as it publishes any other |
nuget | Unchanged. A SemVer prerelease in the .nuspec is one NuGet installs only when asked |
rubygems | Unchanged. A version with a letter, such as 1.4.0.rc.1 in the gemspec, is one RubyGems installs only when asked |
mcp-registry | Unchanged. The registry takes a prerelease version as it takes any other |
The member’s floating tag (release.tag.floating, see the release’s tag) stays where it is.
A channel recorded on the cut wins for the tags it names: npm moves the channel, and OCI pushes only the channel. The forge release is still marked a prerelease, since the label is one. release cut and release publish print prerelease in their dry run and in --json.
SBOMs and provenance
Section titled “SBOMs and provenance”Each target attaches the release’s provenance statement to what it publishes, and an SBOM when it has a source for one (#4049). Both are attached in the stage, so nothing is visible before they are. A missing SBOM source is refused only when the workspace opts into the supply-chain security group, "security": ["supply-chain"] in chant.workspace.json (#4168). Without that group nothing is attached and nothing is printed.
| Target | SBOM | Provenance in CI | Provenance from a workstation |
|---|---|---|---|
| npm | A file in each package, since npm keeps no file beside a package | npm’s own, from --provenance, checked with npm audit signatures | The release’s signature on chant/lifecycle only |
| OCI | An OCI referrer of the image | The provenance statement as a referrer of the image | The same statement, which says its provenance is the signature |
| Forge | An asset of the release | release.intoto.json, an asset of the release | The same asset, which says its provenance is the signature |
| PyPI | A file in each wheel, since an index keeps no file beside a distribution | The PEP 740 attestations beside each file, and one signed at the stage under Sigstore signing | The release’s signature on chant/lifecycle only |
| Cargo | None: a registry keeps no file beside a crate | None | The release’s signature on chant/lifecycle only |
| Maven Central | A -cyclonedx.json, -cyclonedx.xml or -spdx.json file of each component, which the build attaches | None | The release’s signature on chant/lifecycle only |
| NuGet | A file in each package, since a feed keeps no file beside a package | None | The release’s signature on chant/lifecycle only |
| RubyGems | None: a host keeps no file beside a gem | None | The release’s signature on chant/lifecycle only |
The SBOM
Section titled “The SBOM”An npm package must carry its SBOM at its root, in the directory or under package/ in the .tgz, such as one that npm sbom --omit dev --sbom-format spdx > packages/core/sbom.spdx.json writes before packing. Without --omit dev, npm sbom lists the development dependencies too, and the scan before the stage blocks on what the SBOM lists. Keep it in what npm packs: a package with a files list names it there. A package with none publishes without one. Under supply-chain, or when sbom names a file the package does not hold, it is refused with publish-sbom-missing in the plan, before anything is sent, and chant release cut refuses it the same way before it records or tags the release (#5518). A lockfile is no source for a package’s SBOM: the scan reads one written from package-lock.json, but nothing puts it in the package.
A wheel carries its SBOM in .dist-info/sboms/, as PEP 770 places it, written there by the build. Under supply-chain, a pypi target whose wheels carry none, or that publishes no wheel, is refused with publish-sbom-missing; an sdist has no place for one. A cargo target is refused under supply-chain too, since nothing it publishes can carry an SBOM. sbom: false on either target publishes without one; attach the SBOM to the release with a forge target instead.
A Maven component carries its SBOM as one of its files, such as the -cyclonedx.json the CycloneDX Maven plugin attaches, and a NuGet package carries one inside it: a file ending .spdx.json, .cdx.json or .cyclonedx.json, or _manifest/spdx_*/ as Microsoft’s sbom-tool writes it. Under supply-chain, a maven or nuget target with a component or package that carries none is refused with publish-sbom-missing. A rubygems target is refused under supply-chain, as a cargo one is. sbom: false on any of the three publishes without one.
The OCI and forge targets attach the file sbom names. Without one they write an SPDX document from the nearest package-lock.json or pom.xml, in the member’s directory or above it inside the repository, with the hermetic writer the generate-sbom capability uses. It lists the declared dependencies and not an image’s base layers, so an image built with a layer scan (BuildKit’s --sbom, syft) should name that scan’s file in sbom. The document is dated with the cut’s time, so a publish run again writes the same bytes. With neither a declared file nor a lockfile there is nothing to attach, which only supply-chain refuses. A file that is not SPDX or CycloneDX JSON is refused with publish-sbom-invalid. sbom: false publishes without an SBOM.
The provenance statement
Section titled “The provenance statement”The provenance statement is an in-toto Statement v1 with the media type application/vnd.in-toto+json. Its subjects are the digests of what the target publishes: the image’s manifest digest, or each forge asset’s. The predicate type is https://intentius.io/chant/release/v1, and a predicate looks like this.
{ "releaseDigest": "jcs1-sha256:...", "label": "v1.4.0", "member": null, "commit": "3f2a9c1d0b7e...", "cut": { "actor": "alice", "label": "v1.4.0", "timestamp": "2026-10-17T10:00:00.000Z", "runId": "local-1760695200000", "namespace": "chant-release", "signature": "-----BEGIN SSH SIGNATURE-----...", "green": { "source": "chant", "tag": "ci/green/3f2a9c1d0b7e..." } }, "provenance": { "kind": "oidc", "ci": "github" }}cut is the cut whose signature verified, and signature is the armored ssh signature over the release digest, the label, the actor and the time, one per line. Anyone with the repository checks it with chant release verify, offline, against the signers file at the release’s commit. cut.green is the green gate the cut passed, as its cut line records it: { "source": "chant", "tag": ... }, { "source": "forge-checks", "forge": "github", "checks": [...] } with the checks by name, or { "source": "none" }. A cut that ran under an override carries cut.override (who, when, why, and the tag or checks it stood in for) instead. A cut recorded before chant had either has neither field. cut.lane is the lane the cut checked, when it checked one. cut.gate is signed when the cut’s signature verifies and covers that gate, and unsigned otherwise, and cut.sealVersion is 2 on a cut whose signature signs the gate (see Who may cut). provenance.kind is oidc when the run had an OIDC token and signature when it had none, as on a workstation. The statement itself is not signed with the OIDC token. In CI, npm’s provenance is the one a registry records and signs, and for images and forge assets, Sigstore signing adds a signature over it and SLSA provenance signed with the job’s token. Every value comes from the release and its cut and none from the clock. The statement is then the same bytes on every run, and a resumed stage finds what an earlier run attached.
Sigstore signatures
Section titled “Sigstore signatures”With signing on, the OCI, forge and PyPI targets sign what they stage with Sigstore, keylessly with the CI job’s OIDC token, before anything is revealed. The release’s provenance statement and the cut’s ssh signature stay as they are.
| Target | Signature | SLSA provenance |
|---|---|---|
| OCI | A cosign signature (an in-toto statement with predicate type https://sigstore.dev/cosign/sign/v1), a referrer of the image. The image’s SBOM and, when the publish scans, the scan’s findings are signed as attestations too (below) | https://slsa.dev/provenance/v1 over the image, a referrer of the image |
| Forge | <file>.sigstore.json beside each asset, including each file an artifact: entry attaches from release.artifacts, the SBOM and release.intoto.json | release.slsa.sigstore.json, over the declared assets |
| PyPI | A PEP 740 publish attestation for each file, uploaded with it, under trusted publishing only. See Attestations on PyPI | None |
Each is a Sigstore bundle (application/vnd.dev.sigstore.bundle.v0.3+json). An image’s referrers are the ones cosign sign and actions/attest-build-provenance push: the bundle as the one layer, the artifact type the bundle’s media type, and the predicate type in the dev.sigstore.bundle.predicateType annotation. On a registry without the referrers API, such as GHCR, chant lists them under the sha256-<hex> tag the OCI distribution spec falls back to, so cosign finds them:
cosign verify ghcr.io/acme/api@sha256:... \ --certificate-identity-regexp '^https://github\.com/acme/api/' --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-attestation --type slsaprovenance1 ghcr.io/acme/api@sha256:... \ --certificate-identity-regexp '^https://github\.com/acme/api/' --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-attestation --type spdxjson ghcr.io/acme/api@sha256:... \ --certificate-identity-regexp '^https://github\.com/acme/api/' --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-attestation --type vuln ghcr.io/acme/api@sha256:... \ --certificate-identity-regexp '^https://github\.com/acme/api/' --certificate-oidc-issuer https://token.actions.githubusercontent.comcosign verify-blob --bundle api-linux.tar.gz.sigstore.json \ --certificate-identity-regexp '^https://github\.com/acme/api/' --certificate-oidc-issuer https://token.actions.githubusercontent.com api-linux.tar.gzAn image’s SBOM is signed as the attestation cosign attest writes: the SBOM document is the predicate, with the type https://spdx.dev/Document for SPDX (the SBOM made from the image’s layers is SPDX) or https://cyclonedx.org/bom for CycloneDX. When the publish scans before the stage, the findings are signed with cosign’s vulnerability predicate, https://cosign.sigstore.dev/attestation/vuln/v1: the scanner, its version and database, and in result the same document the scan.json referrer holds. The unsigned SBOM, provenance statement and scan.json referrers stay, for readers that do not read bundles. The signed ones tell an assessor that the SBOM and the findings are the ones the release published and not ones pushed later.
chant release verify --sigstore runs these checks for every bundle the publish recorded.
Whatever builds the release, the SLSA statement’s resolvedDependencies lists the source commit and then each base image the image’s Dockerfile names by digest, from the release.images entry whose archive the target pushes: a pkg:docker/<repository>@sha256:<digest> URI, the digest, and the reference as the Dockerfile resolves it, once per image. A base named by tag is left out, and under supply-chain the security-image-base-unpinned check reports it. The SLSA predicate in GitHub Actions is the one actions/attest-build-provenance writes: build type https://actions.github.io/buildtypes/workflow/v1, the workflow, event and repository ids, the release’s commit as the resolved source, and the run as the invocation. In GitLab CI its build type is https://intentius.io/chant/release/build/gitlab-ci/v1, naming the project, its CI config and the job. In Forgejo Actions it is https://intentius.io/chant/release/build/forgejo-actions/v1, naming the Forgejo server, the repository, the workflow (the builder id is the server and the workflow ref) and the run. Outside a forge’s CI it is https://intentius.io/chant/release/build/host/v1, with the origin remote and the commit: on a chant ci serve host the builder id is https://intentius.io/chant/release/builder/ci-serve/ followed by the runner key’s fingerprint, which the host passes in CHANT_RELEASE_RUNNER_KEY_FINGERPRINT, and on a workstation it is https://intentius.io/chant/release/builder/workstation. Each adds internalParameters.chant, the release’s digest, label and member.
A Forgejo runner sets the GITHUB_* variables too, so chant tells it apart by FORGEJO_ACTIONS or GITEA_ACTIONS, or on a runner older than v7 by a GITHUB_API_URL ending in /api/v1, and never takes it for GitHub. In GitHub Actions the issuer follows the server: https://token.actions.githubusercontent.com on github.com, https://token.actions.<host> on a GHE.com host, and <server>/_services/token on GitHub Enterprise Server.
On Forgejo the builder id is <server>/<owner>/<repo>/.forgejo/workflows/<file>@<ref>. <server> is the job’s FORGEJO_SERVER_URL, else its GITHUB_SERVER_URL, and forgejo-runner sets it from the URL the runner itself connects to the instance with, not from the instance’s ROOT_URL. A runner that reaches Forgejo at an internal address puts that address in the id, so whoever checks the id against a pinned value, for example in a policy that matches the builder, has to expect the runner’s URL. The statement’s source URI (git+<server>/<owner>/<repo>@<ref>) and invocation id carry the same server.
chant writes the statements and runs cosign 3 to sign them: cosign sign-blob for a file and cosign attest-blob --statement for a statement. It runs the binary CHANT_COSIGN names, else cosign on PATH. It pushes and uploads the bundles with the target’s own credentials, so cosign never holds a registry or forge token. The certificate names the job’s workflow: in GitHub Actions a job with permissions: id-token: write, and in GitLab CI a job with SIGSTORE_ID_TOKEN under id_tokens with aud: sigstore. Public Fulcio does not issue certificates for other CI systems; sign with a key there.
Signing is off by default. Turn it on in the member’s chant.config.ts:
export default { release: { signing: true, // or name the identity `release verify --sigstore` expects: // signing: { identity: "^https://github\\.com/acme/api/\\.github/workflows/chant-release\\.yml@", issuer: "https://token.actions.githubusercontent.com" }, publish: [{ type: "oci", image: "dist/api.oci.tar", repository: "ghcr.io/acme/api" }], },};The supply-chain group turns it on too, and there signing: false turns it off with a warning. A publish that signs and can’t is refused before anything is sent: publish-signing-no-oidc with no OIDC token cosign can use, publish-signing-key-missing when a key or KMS key can’t sign, and publish-signing-tool-missing with no cosign 3. A stage run again keeps the bundles an earlier run pushed or uploaded, since signing again gives other bytes: an image that already has a referrer with the predicate type is not signed again, and a draft that already holds a bundle keeps it. A release already published without its bundles is refused with publish-forge-release-published. A prerelease is signed as a stable release is. chant release doctor reports whether signing can work from where it runs: the OIDC token and cosign 3. The npm target is not signed here, since --provenance already signs it with Sigstore; chant release verify --sigstore checks that provenance on the registry. The homebrew, marketplace, tauri-updater, cargo, maven, nuget and rubygems targets are not signed.
A private Sigstore instance
Section titled “A private Sigstore instance”A team that may not write its release identities to the public log runs its own Fulcio and Rekor. release.signing.fulcio and rekor name them, and trustRoot names the instance’s trusted_root.json, committed in the member, which a private Fulcio or Rekor requires:
export default { release: { signing: { fulcio: "https://fulcio.sigstore.internal", rekor: "https://rekor.sigstore.internal", trustRoot: "sigstore/trusted_root.json" }, publish: [{ type: "oci", image: "dist/api.oci.tar", repository: "registry.internal/acme/api" }], },};cosign then signs with --use-signing-config=false, so it does not read public Sigstore’s signing config, with --fulcio-url, --rekor-url and --trusted-root, and chant release verify --sigstore checks each bundle with --trusted-root. The Fulcio must trust the CI’s OIDC issuer. A key or a KMS key signs with no Fulcio, and takes rekor and trustRoot to log to a private Rekor. A missing trusted root refuses the publish with publish-signing-trust-root-missing, the doctor reports it as signing-trust-root, and verify leaves each bundle unchecked.
Signing on Forgejo and outside CI
Section titled “Signing on Forgejo and outside CI”Forgejo Actions hands a job an OIDC token when the job sets enable-openid-connect: true, with the issuer <server>/api/actions. Public Fulcio issues no certificate for it, so keyless signing on Forgejo goes through a private Fulcio that trusts the instance; release.signing.issuer names another issuer if the instance’s differs. With one, chant release workflow --forge forgejo gives the publish job, and a dispatched cut job that runs the doctor, enable-openid-connect: true. Without one, it refuses to render a keyless signing step, and names release.signing.kms and key, which sign on Forgejo with no token.
A release published from a chant ci serve host, from the chant git forge or from a workstation has no CI OIDC token either, so it signs with a KMS key or a key. With supply-chain on and the keyless mode, chant release doctor reports there that no mode can sign, and names them.
Signing with a key
Section titled “Signing with a key”A team that can’t sign with a CI job’s OIDC token, such as one releasing from Forgejo, a chant ci serve host or an air-gapped runner, signs with a cosign key or a KMS key instead. release.signing.key names the key, a file from the member or env://NAME for a variable that holds the PEM, and publicKey names its public half, committed in the member, which chant release verify --sigstore checks the bundles against:
export default { release: { signing: { key: "env://RELEASE_SIGNING_KEY", publicKey: "keys/cosign.pub" }, publish: [{ type: "forge", forge: "forgejo", repo: "acme/api", assets: ["dist/api.tar.gz"] }], },};cosign reads the key’s password from COSIGN_PASSWORD, or from the variable passwordEnv names. The variable must be set, and empty for a key made with no password. The bundles are the same as in the keyless mode, signed with --key, and each records the public key in place of a certificate’s identity. The signature goes to the public Rekor log, as cosign writes it by default; rekor: false writes no log entry, and verify then checks without one. A key can’t be mixed with identity or issuer, and key without publicKey is refused when the config is read.
A publish in key mode is refused with publish-signing-key-missing when the key’s variable, the key file, the password variable or the public key is missing, naming which. With no CI OIDC token, --require-provenance is met by the SLSA statement the key signs, and its refusal names what the key is missing. The npm target, whose registry records provenance only from a GitHub or GitLab OIDC token, publishes without npm provenance there, and the release’s own statement is its provenance, as on a workstation.
Signing with a KMS key
Section titled “Signing with a KMS key”release.signing.kms signs with a key held in a KMS, by a reference cosign takes: awskms://, gcpkms://, azurekms:// or hashivault://. The key never leaves the KMS. cosign reads its credentials from the run’s variables, which env names:
export default { release: { signing: { kms: "awskms:///alias/release-signing", publicKey: "keys/release.pub" }, publish: [{ type: "oci", image: "dist/api.oci.tar", repository: "registry.example/acme/api" }], },};| Scheme | Variables when env names none |
|---|---|
awskms:// | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION |
azurekms:// | AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET |
hashivault:// | VAULT_ADDR, VAULT_TOKEN |
gcpkms:// | none: name them in env, or leave it empty for a runner whose own identity reaches the KMS |
The bundles record publicKey, the PEM of the KMS key’s public half from the member (cosign public-key --key <reference> writes it), and verify checks with it. Without publicKey they record the reference, and verify asks the KMS for the public key, so it needs credentials that may read it. rekor: false works as it does for a key. A publish whose credential variables are missing is refused with publish-signing-key-missing, naming them, and --require-provenance with no CI OIDC token is met as it is for a key. The release workflow passes the variables to the publish step alone (see chant release workflow). That holds for credentials kept as repository secrets. When the job gets its cloud credentials from the forge’s OIDC token through a step of the project’s own, for example one that assumes an AWS role and exports session credentials to the job’s environment, those credentials are in the environment of every step after it, and chant does not scope them. To keep the exposure small, put that step as late as the job allows, give the role only the sign and get-public-key actions on the one key, and keep the session short.
A CI job that checks provenance
Section titled “A CI job that checks provenance”A CI job that publishes passes --require-provenance, so a job whose OIDC token is missing fails instead of publishing without provenance. The npm target runs npm audit signatures after its reveal:
permissions: contents: read id-token: writesteps: - uses: actions/checkout@v4 with: { fetch-depth: 0 } - uses: actions/setup-node@v4 with: { node-version: 22, registry-url: https://registry.npmjs.org } - run: npm ci && npm run build - run: npx chant release verify "${GITHUB_REF_NAME#release/}" - run: npx chant release publish "${GITHUB_REF_NAME#release/}" --require-provenance --yesStaging and resuming
Section titled “Staging and resuming”A publish with --yes is all or nothing for a consumer. It stages every target in the order declared, and only when all of them have staged does it reveal them. Between the two it runs the release.verify commands, and one that fails stops it with nothing revealed. An npm target with stage: false stages just before its reveal, after the others have staged and the verify commands have passed. A marketplace, PyPI, Cargo, NuGet, RubyGems or MCP Registry target has nowhere to hold a release unseen, so its stage only checks, and its reveal uploads; the verify commands can’t see it either, and the publish warns about both kinds. A failure while staging leaves nothing a consumer resolves changed, apart from the first version of a new npm package.
The reveals go in three groups, each in the order declared: first the targets whose reveal moves a tag or publishes a draft (npm, OCI, forge, Homebrew, Tauri updater, Maven Central); then the targets that upload at reveal (marketplace, PyPI, Cargo, NuGet, RubyGems), since an upload can’t be taken back; then the targets that reveal last: the MCP Registry, whose entry names packages the other targets publish, and the index targets, whose manifests point at files the other targets make downloadable. Those last go in the order declared, so an index target declared before an mcp-registry target reveals before it. They stage with the rest, where no consumer resolves them. A train publish uses the same order within each member. A failure while revealing leaves the targets before it visible and the rest staged.
Each step is recorded as one line in _releases/publishes.jsonl on chant/lifecycle, beside cuts.jsonl and under the member’s prefix. The file is append-only, and each line is pushed as soon as it is written. This line, version 1, is what chant 0.124.29 and newer write after staging an npm target:
{"version":1,"releaseDigest":"jcs1-sha256:...","label":"v1.4.0","target":"npm:3fa2b1c4d5e6f708","kind":"npm","name":"npm (2 packages)","step":"staged","items":[{"name":"@acme/core@1.4.0","destination":"..."}],"state":{},"runId":"8123456789","timestamp":"2026-10-17T10:00:00.000Z"}| Field | Meaning |
|---|---|
target | The target’s key: its kind and the first 16 hex digits of the SHA-256 of its declaration. A declaration holds variable names and never a credential |
step | staged or revealed; for the release.verify commands, verified or verify-failed, under the target verify:<hex> of kind verify, with the failing command’s step and exitCode in state |
items | What the step published, with each destination and digest |
state | What the reveal needs that it can’t read from the checkout, such as a draft release’s releaseId and releaseUrl |
runId | The CI run, or a local-<epoch ms> id on a workstation |
Run again after a failure, the publish reads the record first. A target with a revealed line is skipped. A target with a staged line is revealed without staging again. The rest stage, and each stage asks its destination before it sends anything: an npm version on the registry, an image digest the registry holds, or an asset on the draft is not sent twice. So a resume publishes nothing twice, and that holds even when a record line was not written or not pushed, only slower. The record is pushed so that a CI job on a fresh clone of the release’s commit resumes where the failed job stopped, since chant release publish fetches chant/lifecycle first. A push that fails is a warning, not a failure.
The record is on the branch rather than read from the registries alone, because a registry can say that a version or a digest is there but not that it belongs to this release’s publish, or that every target of the set has staged, which is when the reveals may start. Each line is redacted before it is written, and holds names, destinations, digests and draft ids, never a credential.
Publishing a release train
Section titled “Publishing a release train”A release train goes out as one set with chant workspace train publish <env> [<train>] --yes, whatever its members publish. It runs in a checkout of the commit the train’s new releases were cut from. Each member whose release was cut from that commit is published by this run. A member the train pins at a release cut from another commit must already be published: its publish record shows every target revealed, or each target that isn’t finds the release’s label on its destination. Otherwise the publish is refused with train-member-unpublished before anything stages.
| Target | A pinned release is published when |
|---|---|
| npm | npm view <name>@<label> version answers for each package |
| OCI | each declared tag with {label} in it is in the repository. With no such tag it can’t tell |
| forge | the forge has a published release, not a draft, for the release’s tag |
| homebrew, index | the branch holds each manifest with the release’s version in it. In mode: "pull-request" a manifest without it can’t tell, since the pull request may be open; over SSH and for the zed preset it can’t tell |
| marketplace | the marketplace lists the version for the extension the .vsix names, or the member’s package.json when the checkout has no .vsix |
| PyPI | the simple API lists a file of the project at the release’s version (1.4.0-rc.1 is 1.4.0rc1) |
| cargo | the index holds each crate at the release’s version. A crate whose Cargo.toml here has another version can’t tell |
| Maven Central | the repository serves each component’s .pom at the release’s version |
| NuGet | the feed’s flat container lists each package at the release’s version |
| RubyGems | the host lists each gem at the release’s version |
| MCP Registry | the registry holds the version of the server server.json names |
| Tauri updater | the rolling release is this version’s. One that holds another version can’t tell |
A target that can’t tell, or that has no credential to ask with, counts as not published.
Every member it publishes is checked as chant release publish checks one, and every target is planned, before anything stages. The members go in dependency layers: a member comes after the members that publish a name it needs. Each target names what it publishes and what it needs, by kind:
| Target | Publishes | Needs |
|---|---|---|
| npm | each package | each key of dependencies, peerDependencies and optionalDependencies |
| OCI | the repository | nothing |
| PyPI | each project its files hold | each project in Requires-Dist that is not under an extra |
| cargo | each crate it publishes | each crate they depend on, apart from dev-dependencies |
| Maven Central | each component, <groupId>:<artifactId> | each dependency in its .pom outside the test, provided and system scopes, and not optional |
| NuGet | each package id | each dependency in its .nuspec |
| RubyGems | each gem | each run-time dependency in its gemspec |
| marketplace | the extension | each extension in extensionDependencies and extensionPack |
| MCP Registry | the server | each npm, PyPI, cargo and NuGet package and each OCI image server.json lists |
| forge, homebrew, index, Tauri updater | where it publishes | nothing |
A dependency no manifest shows, such as an image that bundles another member’s package, goes in the member’s chant.config.ts:
export default { release: { dependsOn: ["core"], publish: [{ type: "oci", image: "dist/api.oci.tar", repository: "ghcr.io/acme/api" }], },};dependsOn names members of the workspace’s chant.workspace.json. One it does not list is refused with train-depends-on-unknown before anything stages. A member the train pins at an earlier release is already published, so a dependency on it orders nothing. Members that depend on each other share a layer. Members of one layer go in name order, so a train of chant’s packages starts with core. The dry run prints each member’s layer and the members it comes after. Read by chant 0.124.101 and newer for targets other than npm and for dependsOn.
Three steps then run across the whole train:
- Every member’s targets stage, layer by layer. A failure here leaves no member visible to a consumer.
- Each member’s
release.verifycommands run, in layer order, after the whole train has staged, with the whole train’s staged references:CHANT_STAGED_NPMnames every member’s staged packages,CHANT_STAGED_IMAGESevery member’s staged images. A failure is recorded in that member’s record and reveals nothing. - Each layer reveals. Before the next layer reveals, the publish waits until each target this layer revealed is served to a consumer, so nothing is visible before what it needs is. It asks again every 10 seconds, with a line about once a minute.
| Target | Waits until |
|---|---|
| npm | npm view <name> dist-tags.latest (or the release’s channel) names each version. registryWait caps the wait; without it the wait ends when the registry serves them or fails |
| OCI | each tag the reveal moved names the image’s digest |
| forge | the forge serves the release for the tag as published |
| homebrew, index | in mode: "commit", the branch serves each manifest as revealed. A pull request waits on the index’s maintainers, so nothing waits for it |
| marketplace | the marketplace lists the version |
| PyPI | the simple API lists each uploaded file |
| cargo | the index holds each crate version |
| Maven Central | the repository serves each component’s .pom. This wait stops after an hour, since Central takes up to half an hour |
| NuGet | the flat container lists each version. nuget.org validates and indexes a package first, which takes minutes |
| RubyGems | the host lists each version |
| MCP Registry | the registry serves the version |
| Tauri updater | the rolling release is this version’s |
Apart from npm, a wait stops after 15 minutes with publish-<target>-not-served, such as publish-pypi-not-served. What revealed stays revealed, and running the same command again goes on from there.
An npm target with stage: false has nothing to hold back, so it is not staged up front. It publishes straight to latest in its layer’s turn, after the layers before it resolve, so the verify commands can’t see it, and the publish warns. A marketplace, PyPI, cargo, NuGet, RubyGems or MCP Registry target uploads in its reveal, in its layer’s turn, for the same reason. A Maven Central target stages its validated deployment up front, as an OCI target does.
Each step goes into the member’s own _releases/publishes.jsonl. Run again after a failure in any layer, the train publish skips what each member’s record shows revealed, reveals without staging again what it shows staged, and waits on each revealed layer again before the next, so nothing is published twice. chant release publish in one member reads the same record.
Deprecating, yanking and restoring
Section titled “Deprecating, yanking and restoring”chant release deprecate, yank and restore act on what a target published for a release, read from the items each target’s revealed line holds in _releases/publishes.jsonl. They never read the checkout. npm deprecates and moves its dist-tag. The OCI target moves its tags with no {label}. A forge release becomes a prerelease, a draft, or is deleted. A tap’s formula is reverted, and so are the manifests of an index target that commits; one that opens pull requests refuses. The cargo target yanks each crate version and a restore undoes the yank. The NuGet target unlists each version on a yank and lists it again on a restore. The RubyGems target yanks each version and refuses a restore, since RubyGems.org takes no yank back. The PyPI, Maven Central, marketplace and Tauri updater targets refuse. A prerelease’s yank moves its own dist-tag, such as rc, back to the previous release with that tag, and never touches latest. The member’s floating tag moves back too. Each target’s actions are recorded in _releases/status-actions.jsonl, so a change that stopped part way resumes.
Credentials
Section titled “Credentials”Every credential comes from the environment of the run, which is the shell on a workstation and the job’s secrets in CI. chant holds it in memory for the requests that need it and never writes it to chant/lifecycle or to a file it keeps. Each line a publish prints passes through a redactor first, and so do the --json document and each error.
| The redactor masks | Such as |
|---|---|
| Each credential a target read, and each token a registry handed back for it | the value of OCI_PASSWORD, a GHCR bearer token |
| The value of each variable CI and registries use for tokens | NODE_AUTH_TOKEN, NPM_TOKEN, NPM_ID_TOKEN, SIGSTORE_ID_TOKEN, ACTIONS_ID_TOKEN_REQUEST_TOKEN, ACTIONS_RUNTIME_TOKEN, GITHUB_TOKEN, GH_TOKEN, GITLAB_TOKEN, CI_JOB_TOKEN, FORGEJO_TOKEN, GITEA_TOKEN, OCI_PASSWORD, DOCKER_PASSWORD, VSCE_PAT, OVSX_PAT, PYPI_TOKEN, TEST_PYPI_TOKEN, TWINE_PASSWORD, PYPI_ID_TOKEN, CARGO_REGISTRY_TOKEN, CRATES_IO_ID_TOKEN, MCP_GITHUB_TOKEN, MCP_REGISTRY_TOKEN, MAVEN_CENTRAL_PASSWORD, NUGET_API_KEY, NUGET_ID_TOKEN, GEM_HOST_API_KEY, RUBYGEMS_ID_TOKEN |
| The value of each variable a declaration names | passwordEnv: "GHCR_PAT" |
| A token written in the forms npm and HTTP headers use | _authToken=..., Authorization: Bearer ..., PRIVATE-TOKEN: ... |
A target that needs a credential and finds none stops the publish before anything is sent, with publish-credentials-missing. chant release doctor checks the same credentials before a cut, and asks each registry what it will say about them.
The target contract
Section titled “The target contract”A target is an object with this shape, from packages/core/src/lifecycle/release-publish.ts:
interface PublishTarget<C extends PublishContextBase = PublishContext, K extends string = "npm" | "oci" | "forge" | "homebrew" | "marketplace" | "tauri-updater" | "pypi" | "cargo" | "mcp-registry" | "index" | "maven" | "nuget" | "rubygems"> { kind: K; name: string; // for messages, such as "npm (2 packages)" destination: string; // printed before it runs credentialEnv: string[]; // variables it reads credentials from, masked from the start key: string; // names the declaration across runs, for the publish record plan(ctx: C): Promise<PublishItem[]>; stage(ctx: C): Promise<StagedTarget>; reveal(ctx: C, staged: StagedTarget): Promise<PublishedTarget>; refusalWarns?: boolean; // a refused stage or reveal is a warning, and the target is not recorded (index onRefusal: warn) // Optional, for a train publish: stagesVisibly?: boolean; // stage already makes the items visible (npm under stage: false) uploadsAtReveal?: boolean; // stage sends nothing and reveal uploads (marketplace, pypi, cargo, nuget, rubygems); reveals after the rest revealsLast?: boolean; // reveals after every other target, uploads included (mcp-registry, index) names?(ctx: C): Promise<{ provides: string[]; needs: string[] }>; published?(ctx: C): Promise<boolean | null>; visible?(ctx: C, published: PublishedTarget): Promise<void>; // Optional, for chant release deprecate|yank|restore: setStatus?(ctx: StatusContext): Promise<StatusAction[]>;}plan reads what the target would publish and checks that it can: the files are there, they match the release’s digests, the credentials are set. It uploads nothing and sends no request that changes anything. The publish plans every target before any of them stages, and the dry run prints what plan returns.
stage puts every item where the target publishes but where no consumer resolves it yet. It asks the destination first, sends nothing already there, and returns such an item with present: true. The StagedTarget that comes back holds the items and a state of strings the reveal needs. The record keeps that state, so it must never hold a credential. reveal is the one last step that makes the staged items visible, given what stage returned in this run or in an earlier one. Run again, it must move nothing that already moved. A target whose destination may refuse a release without failing the publish, as a marketplace with onRefusal: "warn" does, returns from reveal with its items refused: true and a warning, and is not recorded as revealed. A target with revealsLast stages with the rest and reveals after every other target, and with refusalWarns a PublishTargetError from either step becomes a warning in the same way; a refused stage skips the target’s reveal. All three throw PublishTargetError with a code, a message and an optional fix. A failure part way names what was already staged or revealed.
The optional members serve a train publish. names gives what the target publishes and what of others’ it depends on, which orders the members in layers. published says whether the destination already holds the release’s label, without checking digests, since the checkout is not that release’s commit; null means it can’t tell, and the train publish refuses. visible waits until a consumer resolving the reveal’s tag gets what was revealed, and the next layer waits on it. A target with none of them is ordered with no dependencies, is never taken as published from its destination alone, and is not waited on.
setStatus deprecates, yanks or restores a release on the target. Its StatusContext extends PublishContextBase with the release, its label and tag, the status being set, the reason and replacement, the items the release revealed there, the head (the release the target’s moving tags should name once the status is set, with its revealed items, or null), the forgeYank mode and apply. With apply false it asks nothing and returns what it would do. Each StatusAction is a line what, with already: true when the destination was already so, or refused with a code and a message when the destination can’t do it. A target without setStatus refuses every status change.
A release target is given a PublishContext with these fields. The last five (cwd, tag, env, redactor and log) and provenance make up PublishContextBase, and the rest belong to the release.
| Field | Meaning |
|---|---|
release, label | The release and its label, or null |
releaseTag | The tag the cut made, or null with no label |
provenance | Whether the run has an OIDC token, and why not |
cut | The cut whose signature the provenance statement carries: actor, label, timestamp, runId and signature. Optional; null when none is known |
cwd | The member’s directory |
tag | A tag for the reveal to move in place of the target’s own (npm’s latest, the OCI tags), or null. Staging never uses it |
env | The environment credentials are read from |
redactor | Masks credentials. A target adds each credential and token it reads |
log(line) | Prints a line of progress, redacted |
The targets take their dependencies through PublishDeps, which holds the fetch the OCI, forge, homebrew, index, marketplace, PyPI, Maven Central, NuGet and RubyGems targets use, the sleep and now that the index target’s wait for a new fork reads, the npm, vsce and cargo executables, and the git and ssh that the homebrew and index targets run over SSH. In the tests npm runs as a fake binary that keeps a registry with dist-tags in a file, the OCI target pushes to a registry fake that the test starts on 127.0.0.1, the forge targets call a forge fake with draft releases, the PyPI target uploads to a fake index, and cargo is a fake binary that writes a fake sparse index. The Maven Central target talks to a fake Central Portal and repository, and the NuGet and RubyGems targets to fakes of their push, listing and trusted-publishing endpoints. The index target calls a GitHub fake with forks and pull requests, and pushes over SSH to a local bare repository.
A target that publishes something other than a cut release takes its own context as C, which extends PublishContextBase, and its own kind names as K (#4602). The terraform lexicon’s module targets publish a module version this way. They throw PublishTargetError and take their requests and clock through PublishDeps. Credentials are read with readCredential from lifecycle/publish-credentials.ts and masked by the context’s redactor. Their own code makes them, so they never appear under release.publish.
Adding a kind of release target takes three changes. Its schema joins the declaration union in lifecycle/publish-declaration.ts, and a factory in a module of its own returns its PublishTarget. Then createPublishTargets in lifecycle/publish-targets.ts gets a case that calls the factory.
A target attaches its SBOM and provenance with the helpers in lifecycle/publish-attachments.ts: memberSbom for an SBOM beside what it publishes, packageSbom for one inside a package, and releaseProvenance for the statement. Each attached file comes back as a PublishItem with attachment set to sbom or provenance.