semantic-release

Automates releases from CI: derives the next semver version from commit messages, generates release notes, tags Git, and publishes packages via plugins.

semantic-release automates the package release workflow: it determines the next version number, generates release notes, creates a Git tag, and publishes the package. It follows the Semantic Versioning specification and derives the version bump from commit messages rather than manual decisions.

By default it reads Angular Commit Message Conventions. A fix(...) commit produces a fix (patch) release, feat(...) produces a feature (minor) release, and a commit with a BREAKING CHANGE: footer produces a breaking (major) release. The convention can be changed through the preset or config options of the @semantic-release/commit-analyzer and @semantic-release/release-notes-generator plugins. Tools such as commitizen and commitlint can help enforce the format.

It is meant to run in CI after each successful build on a release branch such as master, main, next, or beta. When the semantic-release command runs, it goes through these steps: verify conditions, get the last release from Git tags, analyze commits, verify the release, generate notes, create a Git tag, prepare, publish, and notify. Support for different package managers and languages comes from plugins, and configuration can be shared through shareable configurations. It supports distribution channels (such as npm dist-tags), maintenance releases, and pre-releases, plus npm package provenance on GitHub Actions.

It requires code hosted in a Git repository, a CI service with securely configured credentials, and compatible Git and Node.js versions in the CI environment. Maintainers of npm packages and other libraries who want releases to be driven by commit history would use it.

Alternatives & related tools

add a badge to your README

Maintain semantic-release? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/semantic-release.svg)](https://www.trmn.sh/tools/semantic-release?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/semantic-release?utm_source=badge"><img src="https://www.trmn.sh/badge/semantic-release.svg" alt="Featured on trmn" height="20"></a>