Releasing
Validate, version, tag, publish, and verify the npm package.
Publishing is tag-driven. A merge to main does not publish the npm package.
Documentation-only and internal refactors do not need a package release.
Before the version bump
Run:
bun install
bun run build
bun run test:ci:unit
bun run test:ci:integration
npm pack --dry-run
npm view @rama_nigg/open-cursor versionInspect the dry-run file list. The package should contain the built output,
source, and the two runner scripts declared in package.json.
Version and tag
Choose the semver increment, then:
npm version patch
git add package.json package-lock.json
git commit --no-verify -m "chore: bump version to X.Y.Z"
git push origin main
git tag vX.Y.Z
git push origin vX.Y.ZReplace patch with minor or major when the change requires it. Confirm
that the tag and package.json contain the same version before pushing.
Publish workflow
A pushed v* tag runs .github/workflows/publish.yml. The workflow:
- checks that the tag matches
package.json; - installs with Bun;
- builds and runs the canonical unit suite;
- runs
npm pack --dry-run; - publishes publicly through npm trusted publishing;
- creates a GitHub release from the tag.
Integration tests run on pushes to main and are deliberately not repeated in
the publish job.
The workflow can also be started manually. Its default is a dry run; publishing
requires setting dry_run to false.
Verify the release
After the workflow succeeds:
npm view @rama_nigg/open-cursor version
npm install -g @rama_nigg/open-cursor@latest
open-cursor doctorDo not report a release complete until the registry returns the new version.