Release procedure
3.1 How tagging works
Section titled “3.1 How tagging works”Every merge to main is a release; the merged PR’s title decides the bump
(fix:, chore:, docs:, ci: patch; feat: minor). Nobody labels a PR.
- A repo’s
.github/workflows/release.ymlcallsnyuchi/.github/.github/workflows/reusable-trunk-release.yml@<40-hex>, pinned by SHA. It reads the merged PR’s title, computes the next version (thenext-versionaction) and pushes an annotatedv<version>tag and a GitHub release with generated notes. - A tag pushed with the run’s
GITHUB_TOKENstarts no downstream workflow. Repos with no release workflow of their own are tagged every 15 minutes byauto-release.yml, as the enterprisebundu-releaseapp (its key lives only in theorg-releaseenvironment); app tags do starton: push: tagsworkflows.AUTO_RELEASE=offopts a repo out. - A major is made by hand, by the owner: the repo’s release workflow
from the Actions tab with
bump: major. Afeat!:orfix!:title is refused on purpose. Agents never set a major and never renumber a release.
Check a merge’s result with gh release list -R <owner>/<repo> --limit 3.
3.2 npm packages
Section titled “3.2 npm packages”Reference: mzizi-dev/mzizi-cli/.github/workflows/release.yml.
- Trusted publishing over OIDC; no
NPM_TOKEN. The package’s trusted publisher on npmjs.com names the repo and workflow file. The job runs in thereleaseenvironment withid-token: write, npm 11.5.1 or newer, and noregistry-url(the OIDC token must be the only credential). - It runs on a
v*tag and first checks the tag equals the version inpackage.json(andCargo.toml, where there is one). - Publish with provenance; skipping a version already on the registry makes a re-run safe:
npm view "<package>@<version>" version >/dev/null 2>&1 \ || npm publish --access public --provenanceactions/download-artifactdrops file modes: restore executable bits and checknpm packplustar -tvzfbefore publishing.- Post-publish smoke test, a job after publish on
ubuntu-latest,macos-latestandwindows-latest: in a cleanmktemp -d, wait untilnpm viewserves the version (minutes, not seconds),npm installit, run the binary and compare the printed version. - If the smoke test fails, the version is public: ship a patch release.
Never unpublish. Never
npm deprecateunless the owner asks.
3.3 crates.io
Section titled “3.3 crates.io”A crates.io version is irreversible: yankable, never replaceable or deletable. Every publish is a one-way door.
- Name every crate with its project identity prefix:
bundu-*,mzizi-*,nyuchi-*. A rename is a new crate (age-hybridbecamebundu-age-hybrid). Never publish an unprefixed name. - Dry run first, always:
cargo publish --dry-run --lockedcargo package --list --lockedcargo package --list must show no fuzz/, tests, CI files or secrets;
fix exclude or include in Cargo.toml and list again.
- Publish workflow (reference:
bundu-labs/age-hybrid/.github/workflows/publish.yml): manualworkflow_dispatchwithversion(the tag without thev) anddry_run(default true). It checks outv<version>and fails unlessCargo.tomlandCHANGELOG.mdagree with the tag. - Run it with
--ref v<version>. Thereleaseenvironment accepts onlyv*tags and refuses a branch, so a dispatch frommainis rejected by design. Dry run, review, then the real one:
gh workflow run publish.yml -R <owner>/<repo> --ref v<version> \ -f version=<version> -f dry_run=truegh workflow run publish.yml -R <owner>/<repo> --ref v<version> \ -f version=<version> -f dry_run=false- The publish gate needs green CI on the tagged commit: the job reads
repos/<repo>/commits/<sha>/check-runsand fails closed on any named check that is missing, running or notsuccess. - The token lives in the repo’s
releaseenvironment asCARGO_REGISTRY_TOKEN, entered by the owner, never in chat. Confirm it exists by name only:gh api repos/<owner>/<repo>/environments/release/secrets --jq '.secrets[].name'. - After the first publish, switch to crates.io trusted publishing (the
crate must exist first, which is why release one uses the token), then
remove the token and the
# zizmor: ignore[use-trusted-publishing]marker. - Workspaces publish in dependency order and skip versions already on
crates.io (
mzizi-registry’spublish-crates.yml). A new crate can hit HTTP 429; wait and re-run.
3.4 Homebrew tap and clean-directory verification
Section titled “3.4 Homebrew tap and clean-directory verification”Repo mzizi-dev/homebrew-tap, formula Formula/mz.rb. Each mzizi-cli
release publishes SHA256SUMS next to the platform binaries.
- In
Formula/mz.rb, changebase(the release tag) and the foursha256values (macOS arm and Intel, Linux arm and Intel), copying each hash fromSHA256SUMS; never type one by hand. - In the PR:
brew audit --strict mzizi-dev/tap/mzandbrew test mzizi-dev/tap/mz. - After merge, verify from a clean directory, never a source checkout:
brew install mzizi-dev/tap/mz && mz --version, thennpm install @nyuchi/mzizi-cli@<v>andcargo install mzizi-cli --version <v> --locked. Each must run and print the released version.