tty-assert: cut an npm release
Human-oriented detail: docs/release.md.
Preconditions
- Default release branch is
mainunless the user specifies another branch. - Working tree should be clean before committing; resolve or stash unrelated changes first.
- If the target version is unclear, ask for
X.Y.Z(semver) before editing files.
Steps (execute in order)
CHANGELOG — In
CHANGELOG.md, insert a new section immediately after# Changelog:## [X.Y.Z] - YYYY-MM-DD - Concise bullets: what changed for users or integrators.Use today’s date in ISO form (
YYYY-MM-DD). The heading must be exactly## [X.Y.Z](nov); this string is what.github/workflows/release.ymlgreps for.Version — Set
"version": "X.Y.Z"inpackage.jsonto match.Verify — From repo root, run (use
nix develop -cbefore these if the user’s environment requires it):pnpm lint && pnpm test && pnpm buildFix any failures before committing.
Commit — Stage at least
CHANGELOG.mdandpackage.json:git add CHANGELOG.md package.json git commit -m "chore: release vX.Y.Z"Tag — Create an annotated or lightweight tag
vX.Y.Zon that commit:git tag vX.Y.ZPush — Push the branch first, then the tag (replace
mainif needed):git push origin main git push origin vX.Y.ZHandoff — Tell the user to watch GitHub → Actions → Release for the run triggered by
vX.Y.Z. Remind them that Trusted Publishing must already link this repo to npm (seedocs/release.md).
Do not
- Push a tag without the matching
## [X.Y.Z]block inCHANGELOG.md(CI will fail). - Skip
pnpm lint,pnpm test, orpnpm buildbefore the release commit unless the user explicitly accepts that risk.