A config for semantic-release.
Install the config and it's peer dependencies.
pnpm i -D @nick-mazuk/semantic-release-config semantic-release @semantic-release/changelog @semantic-release/git
Create a release.config.cjs
file in the root of your repo.
module.exports = {
extends: ['@nick-mazuk/semantic-release-config'],
}
Create a .github/workflows/release.yml
file.
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 14
- name: Install dependencies
run: npx pnpm i --frozen-lockfile=false
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
Add your NPM_TOKEN
token to your repository's secrets.