@ivuorinen/semantic-release-config
v1.2.2
Published
ivuorinen's shareable configuration for semantic-release.
Maintainers
Readme
@ivuorinen/semantic-release-config
ivuorinen's shareable configuration for
semantic-release.
Table of Contents
Plugins
This shareable configuration uses the following plugins:
@semantic-release/commit-analyzer— determines version bumps using the Conventional Commits preset@semantic-release/release-notes-generator— generates release notes with typed sections@semantic-release/npm— publishes to npm@semantic-release/github— creates GitHub releases
Release Rules
This config is designed to work with Renovate commit conventions:
| Commit pattern | Example | Release |
|-----------------------|-------------------------------------------|------------|
| feat: ... | feat: add new option | minor |
| fix: ... | fix: resolve parsing error | patch |
| chore(deps)!: ... | chore(deps)!: update X (1.0.0 → 2.0.0) | minor |
| chore(deps): ... | chore(deps): update X (1.0.0 → 1.1.0) | patch |
| chore(actions): ... | chore(actions): update actions/checkout | no release |
Installation
Install this config as a devDependencies:
# npm
npm install @ivuorinen/semantic-release-config --save-dev
# Yarn
yarn add @ivuorinen/semantic-release-config --devAfter installing it, a .releaserc.json file will be created automatically in the project's root folder with the following configuration:
{
"extends": ["@ivuorinen/semantic-release-config"]
}Configuration
Ensure that your CI configuration has the following secret environment variables set:
GH_TOKENwithpublic_repoaccess orGITHUB_TOKEN.NPM_TOKEN
See each plugin documentation for required installation and configuration steps.
GitHub Actions
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@v4
with:
always-auth: true
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-releaseDocumentations
Read the semantic-release docs for more information.
Contributing
If you are interested in helping contribute, please take a look at our contribution guidelines and open an issue or pull request.
License
Distributed under the MIT License. See LICENSE for more information.
