@aurora-is-near/semantic-release-config
v1.5.4
Published
A shareable semantic release configuration
Keywords
Readme
Semantic Release Config
A shareable Semantic Release configuration.
This repository enforces semantic commit messages. For more details and examples see the Conventional Commits Specification.
Installation
Install the package:
yarn add @aurora-is-near/semantic-release-config -DAs well as the peer dependencies:
yarn add semantic-release -DUsage
Add the following to your semantic-release configuration file (e.g. .releaserc.json):
{
"extends": "@aurora-is-near/semantic-release-config"
}Packages
By default this configuration uses the npm plugin to publish your code as a package.
If you do not want to release your code as a package add "private": true to
your package.json. This can be useful when we have a service (e.g. a website
or API) where we still want to take advantage of the tagging behaviour provided
by semantic release, just not deploy the code as an NPM or GitHub package.
Commit linting
This package is best used alongside commitlint and husky, in order to enforce the required commit message structure.
Install these packages with:
yarn add @commitlint/cli @commitlint/config-conventional husky -DCreate a file at commitlint.config.js with the following contents:
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: { 'body-max-line-length': [0] },
};And a file at .husky/commit-msg with the following contents:
npx --no -- commitlint --edit $1And add a prepare script to your package.json:
npm pkg set scripts.prepare="husky"GitHub Actions output
The configuration sets previous-version and next-version
variables as
GitHub Actions outputs,
which can be useful for defining complex workflows.
