This repository uses a changelog-driven release flow modeled after Shakapacker:
- You update
CHANGELOG.mdvia/update-changelog. - You commit and push to
main. - CI runs the release script (powered by
release-it), bumpspackage.json, publishes npm, tags, and creates the GitHub release.
- Repository has
NPM_TOKENconfigured in GitHub Actions secrets. - Repository has
GITHUB_TOKENavailable to the workflow (default Actions token is used). - Maintainer has permissions to merge to
main. - You have
/update-changelogavailable in your workflow.
-
Ensure release-ready PRs are merged.
-
Run:
/update-changelog release -
Review
CHANGELOG.mdfor the new top version header (for example## [v1.2.3] - YYYY-MM-DD). -
Commit and push only changelog/documentation changes.
-
Merge/push to
main.
That push triggers .github/workflows/release-on-main.yml, which executes ./scripts/release.sh and will:
- Read target version from the top changelog version header.
- Bump
package.json(andpackage-lock.json) to that version. - Run tests/build.
- Commit/push the version bump to
main. - Publish to npm (
latestfor stable). - Create/push tag
vX.Y.Z. - Create GitHub release via
release-it.
Release behavior is configured in:
.release-it.jsonscripts/release.sh
- Do not manually edit
package.jsonversion for release prep. - Use
/update-changelog rcor/update-changelog betato produce prerelease headers. - Prerelease versions must use npm semver prerelease format:
1.2.3-rc.01.2.3-beta.0
-
Run:
/update-changelog rcor
/update-changelog beta -
Confirm top changelog header is prerelease, e.g.
## [v1.2.3-rc.0] - YYYY-MM-DD. -
Commit and push changelog changes.
-
Merge/push to
main.
Release automation will detect prerelease version and publish to npm dist-tag next automatically.
You can validate locally without publishing:
npm run release:dry-runThis checks branch, changelog/version state, and test/build readiness, and prints planned release actions.
- npm package version/dist-tag:
- Git tag exists:
vX.Y.Z
- GitHub release exists: