We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime. Privacy policy

Skip to content
devvkit
$devvkit learn --librarie release-it:-opinionated-release-orchestration-guide

release-it: Opinionated Release Orchestration Guide

[oss-stack][release][automation][npm]
Open Source
Install
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

Install and configure· Script and minimal config.
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

Run a release· Interactive prompt, dry run, or direct.
# 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
Conventional Commits plugin· Derive version and changelog from commit history.
npm install --save-dev @release-it/conventional-changelog

# .release-it.json:
{
  "plugins": {
    "@release-it/conventional-changelog": {
      "infile": "CHANGELOG.md",
      "preset": "conventionalcommits"
    }
  }
}

Hooks

Hooks· Run anything at each release stage.
"hooks": {
  "before:init": "npm test",
  "after:bump": "npm run build",
  "after:release": "curl -X POST $WEBHOOK_URL"
}

Integrations

GitHub and GitLab releases· Publish release notes alongside the tag.
# Enable GitHub repo integration:
{
  "github": { "release": true, "assets": ["dist/*.zip"] },
  "gitlab": { "release": true }
}

# Requires a GITHUB_TOKEN or GITLAB_TOKEN in your environment.