This GitHub workflow actions simplifies the release of new versions.
- ✅ NPM release
- ✅ GitHub release
- ✅ GitHub release change note
- Create an NPM access token for automatisation.
- Add this token as action secret to the GitHub repository.
- Create a workflow file
.github/workflows/release.yml
:
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: scriptpilot/github-action-npm-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- Increase the version in the
package.json
file. - Commit and push the change to the repository.