Demartini’s shareable configuration for
semantic-release
.
This shareable configuration use the following plugins:
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/npm
@semantic-release/github
@semantic-release/git
Install this config
as a devDependencies
:
# npm
npm install @demartini/semantic-release-config --save-dev
# Yarn
yarn add @demartini/semantic-release-config --dev
After installing it, a .releaserc.json
file will be created automatically in the project's root folder with the following configuration:
{
"extends": ["@demartini/semantic-release-config"]
}
Ensure that your CI configuration has the following secret environment variables set:
GH_TOKEN
withpublic_repo
access orGITHUB_TOKEN
.NPM_TOKEN
See each plugin documentation for required installation and configuration steps.
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/[email protected]
with:
always-auth: true
node-version: 14
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies with Caching
uses: bahmutov/[email protected]
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release
Read the semantic-release docs for more information.
If you are interested in helping contribute, please take a look at our contribution guidelines and open an issue or pull request.
See CHANGELOG for a human-readable history of changes.
Distributed under the MIT License. See LICENSE for more information.