A config for semantic-release.
- Adds a few extra commit types
- Creates changelog automatically
- Pushes changelog back into Git repo
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.
- build: Changes that affect the build system (example scopes: gulp, broccoli, npm)
- bump: Dependency updates
- ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- style: A change in CSS
- BREAKING: Any breaking change