release-it: Opinionated Release Orchestration Guide
npm install --save-dev release-it # package.json: "release": "release-it"
release-it is the middle ground between hand-rolled releases and full automation. One command: reads the latest git tag, bumps the version (with `npm version` semantics or Conventional Commits via a plugin), updates the changelog, commits the release, creates the tag, pushes, and publishes to npm. Unlike semantic-release it expects a human behind the wheel: perfect for projects that release deliberately, not on every merge.
It is highly scriptable: hooks run at each stage (before/after bump, before/after git push), GitHub and GitLab release plugins publish release notes, and the changelog can render from templates. For teams that want release discipline without surrendering control, release-it is the standard answer.
Setup
npm install --save-dev release-it
# package.json:
"release": "release-it"
# .release-it.json:
{
"git": { "commitMessage": "chore: release v${version}" },
"npm": { "publish": true }
}CLI Usage
# Interactive (asks for version bump type): npm run release # Dry run: do not touch anything: npx release-it --dry-run # No interactive prompt, explicit version: npx release-it 2.3.0 # Only bump + tag, skip npm publish: npx release-it v2.3.0 --no-npm.publish
npm install --save-dev @release-it/conventional-changelog
# .release-it.json:
{
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": "conventionalcommits"
}
}
}Hooks
"hooks": {
"before:init": "npm test",
"after:bump": "npm run build",
"after:release": "curl -X POST $WEBHOOK_URL"
}Integrations
# Enable GitHub repo integration:
{
"github": { "release": true, "assets": ["dist/*.zip"] },
"gitlab": { "release": true }
}
# Requires a GITHUB_TOKEN or GITLAB_TOKEN in your environment.