How releases are cut for the codealmanac npm package. Local, manual, and
opinionated — the same pattern the OpenAlmanac MCP package uses.
From a clean checkout of main on the maintainer's machine:
cd ~/Desktop/Projects/codealmanac
git pull
npm test # must pass
npm run build # must succeed
npm pack --dry-run # sanity: tarball contains only expected files
npm version patch # or: minor | major — commits + tags
git push && git push --tags
npm publish --access public
npm view codealmanac version # confirm the new version is liveThe publishcodealmanac Claude skill wraps these steps. Prefer invoking
the skill over running the commands by hand; skill keeps the checks uniform.
Publishing runs from the maintainer's machine using the npm auth token in
~/.npmrc. No GitHub Secret, no rotating token, no CI publish workflow.
- Matches the existing
publishmcpflow for the OpenAlmanac MCP package. - npm's granular tokens max out at 90 days for read-write — local auth via
a classic automation token in
~/.npmrcavoids the rotation treadmill. - One less moving piece.
.github/workflows/publish.yml exists but is disabled (workflow_dispatch
only, with a hard-fail step). It's kept as a reference in case we want CI
provenance attestation later — that's the main thing local publish gives up.
If we flip to CI publish, the path is: restore the tag trigger, add a
NPM_TOKEN repo secret, drop the fail-stop step. History at commit 196d423.
Semver, with pre-1.0 specifics:
- Pre-1.0 breaking changes bump minor:
0.1.x→0.2.0. - Pre-1.0 features and fixes bump patch:
0.1.0→0.1.1. - Cut 1.0 when the CLI surface is stable and we've dogfooded it on real repos (not just fixture tests).
- First release is
v0.1.0, cut once slice 5 (capture + hook) lands.
Prereleases (0.1.0-rc.1) are allowed but reserved for genuine release
candidates — not the default flow.
Before running npm version:
- All tests pass on
main(npm test) -
npm run buildsucceeds cleanly -
npm pack --dry-runshows only:dist/,prompts/,README.md,LICENSE.md,package.json. No source, no tests, no.git, nonode_modules. -
README.mddescribes the current feature set accurately — not aspirational. Users read this on npmjs.com. -
CHANGELOG.mdupdated with the release notes. TODO: addCHANGELOG.mdonce we have multi-release history.
The maintainer's ~/.npmrc holds a classic automation token scoped to the
maintainer's npm user. That user has publish rights on the unscoped
codealmanac package (claimed on first publish — whoever publishes v0.1.0
claims it).
If the token ever expires or the maintainer changes, regenerate at
https://www.npmjs.com/settings/~/tokens ("Generate New Token" → "Classic
Token" → "Automation"), and replace the value in ~/.npmrc:
//registry.npmjs.org/:_authToken=<token>
Don't, if you can avoid it. npm's rules:
npm unpublish codealmanac@x.y.zonly works within 72 hours of publish.- After 72 hours, use
npm deprecate codealmanac@x.y.z "reason"instead. The version stays installable but warns on install. - Never reuse a version number — once published (even if unpublished),
that exact
name@versionis burned forever.
If a release is broken, fix forward: publish a new patch that supersedes the broken one. Don't try to erase history.