name: release-jinn-cli description: Use when cutting a new jinn-cli release for this repo - bumping the version, publishing to npm, creating the GitHub release, and letting the Homebrew formula auto-update. Covers the exact order that matters (npm publish BEFORE publishing the GitHub release).
Releasing jinn-cli
The published npm package is jinn-cli (lives in packages/jinn). The root
package (jinn) is private; packages/web is internal (its version isn't shipped).
Version lives in one place: packages/jinn/package.json.
How the pieces connect
- npm: published manually with
npm publishfrompackages/jinn. The package shipsdist/andtemplate/(see itsfiles), so you MUST build first. - GitHub release: created for tag
vX.Y.Z. - Homebrew:
.github/workflows/bump-formula.ymlfires onrelease: published. It waits (up to ~5 min) for the npm tarball atregistry.npmjs.org/jinn-cli/-/jinn-cli-X.Y.Z.tgz, computes its sha256, rewritesFormula/jinn.rb, and pushes the bump tomain. - CI (
ci.yml) runs typecheck/test/build onmain+ PRs. It does not publish.
Order matters: publish to npm before publishing the GitHub release, or the formula-bump job will wait and then fail because the tarball isn't on npm yet.
Steps
Land the work on
main(merge the PR). Releases are cut frommain; the formula-bump job also pushes tomain. Ensure a clean tree:git status.Pick the version. This is
0.x, so a minor bump (0.N.0) is fine even for small breaking changes; patch (0.x.N) for fixes only.Bump + commit (no
Co-Authored-By: Claudetrailer - repo convention):# edit packages/jinn/package.json "version" git commit -am "chore(release): jinn-cli vX.Y.Z"Build + verify from repo root:
pnpm build # turbo build + copies packages/web/out -> packages/jinn/dist/web pnpm typecheck && pnpm testPublish to npm. A gitignored npm automation token lives at
packages/jinn/.npmrc(//registry.npmjs.org/:_authToken=...). npm reads it automatically when publishing from that directory, so it bypasses the account's interactive login + 2FA OTP. Publish:cd packages/jinn && npm publish && cd -- This is the irreversible step - confirm with the maintainer first.
- If publish fails with
E401/EOTP, the token file is missing or revoked. Recreate it at npmjs.com → Access Tokens → Classic → Automation, then write//registry.npmjs.org/:_authToken=<token>topackages/jinn/.npmrc(it's already in.gitignore- never commit it).
Tag + push:
git tag vX.Y.Z && git push origin main --tagsCreate the GitHub release (publishing it triggers the Homebrew bump):
gh release create vX.Y.Z --title "vX.Y.Z" --notes "...release notes..."For a dry run, add
--draft(drafts do NOT trigger the formula workflow).Verify: a
formula: bump to vX.Y.Zcommit lands onmainwithin ~5 min (check the bump-formula workflow run), andnpm view jinn-cli versionis X.Y.Z.
Notes
- Don't bump
package.jsonin the root orpackages/web- onlypackages/jinn. - If the formula job fails, it's almost always the npm tarball not being live yet;
re-run the workflow once
npm view jinn-cli@X.Y.Zresolves.