Skip to content

Features

Semantic Release

Commit Message Format

Semantic-release relies on commit messages to determine the impact of changes in the codebase on users. By adhering to standardized commit message conventions, semantic-release can automatically calculate the next semantic version number, generate a changelog, and publish the release.

Tools such as commitizen or commitlint can assist contributors in maintaining valid commit messages.

The table below demonstrates how different commit messages result in specific release types when semantic-release runs (using the default configuration):

Commit message Release type
fix(pencil): stop graphite breaking when too much pressure applied Fix Release
feat(pencil): add 'graphiteWidth' option Feature Release
perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.
Breaking Release
(Note that the BREAKING CHANGE: token must be in the footer of the commit)

Automation with CI

Semantic-release is designed to run on a Continuous Integration (CI) environment after every successful build on the release branch. This approach ensures that no human intervention is required during the release process, making releases objective and emotionless.

Triggering a Release

Whenever a new commit is added to one of the release branches (e.g., main, next, or beta) through git push, merging a pull request, or merging from another branch, a CI build is triggered. This build executes the semantic-release command, initiating a release if there are any changes to the codebase that affect the package's functionality since the last release.