# semantic-release

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

Stars: 24.2k · Language: JavaScript · License: MIT · Categories: Dev Tools

- Repository: https://github.com/semantic-release/semantic-release
- Website: https://semantic-release.org
- Page: https://www.trmn.sh/tools/semantic-release

## Overview

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

- [SVGO](https://www.trmn.sh/tools/svgo.md): Node.js library and CLI that optimizes SVG files by removing metadata, comments, hidden elements and redundant values, using a configurable plugin system. (JavaScript, 22.8k stars)
- [AVA](https://www.trmn.sh/tools/ava.md): Node.js test runner that runs test files concurrently in isolated processes, with diff-based assertion output, TypeScript definitions, and watch mode. (JavaScript, 20.8k stars)
- [terminalizer](https://www.trmn.sh/tools/terminalizer.md): Terminal session recorder that generates animated GIF images from command-line sessions (JavaScript, 16.2k stars)
- [release-it](https://www.trmn.sh/tools/release-it.md): Generic CLI for automating releases: version bumps, git commit/tag/push, changelogs, GitHub/GitLab releases, and npm publishing, with hooks and plugins. (JavaScript, 9.1k stars)
- [np](https://www.trmn.sh/tools/np.md): Interactive release tool for npm packages that checks the working tree, runs tests, bumps versions, creates tags, publishes, and pushes to Git. (JavaScript, 7.7k stars)

---

Canonical: https://www.trmn.sh/tools/semantic-release
