← Back to Docs
Recipe

Semantic Release

Automate versioning and package publishing with conventional commits.

Overview

Semantic Release parses your commit history since the last tag, determines the next semver bump, generates a changelog, and publishes the release — all without manual version wrangling.

Quick Start

npx semantic-release --dry-run

Dry-run mode previews the next version without pushing tags or publishing.

Configuration

Add a .releaserc at your project root. Define branches, plugins for commit analysis, changelog generation, and your publish target (npm, GitHub releases, etc.).

Commit Convention

  • fix: → patch bump
  • feat: → minor bump
  • feat!: or BREAKING CHANGE: footer → major bump

CI Integration

Run semantic-release on your main branch after tests pass. It handles the full lifecycle: analyze commits → bump version → generate notes → publish → push tag.