@freakin-ward/semantic-release-example
v1.1.2
Published
Simple demo of setting up semantic release, commitizen and husky
Downloads
6
Readme
Simple demo of setting up semantic release, commitizen and husky
semantic-release-example
Inspired by these articles
- Automate package releases with semantic-release and commitizen
- How to control your deployments and versioning with semantic-release & friends
- Making commits the right way with hooks
- How to lint git commit messages
Getting Started
This project demonstrates how to setup and configure semantic-release using conventional commits and commitizen.
Use npm run cz
instead of git commit
- Install and configure semantic-release-cli
- Commit messages
Install
Summary of changes required for implementation in this project
- run
npm i -g semantic-release-cli
- run
semantic-release-cli setup
things
npm-release.yml
This github action is configured to run manually or with each push to main
.
semantic-release-cli will need access to both the github_token
secret and npm_token
.
- Create a npm publish token
- Create a github secret, named
NPM_TOKEN
- Pass
GITHUB_TOKEN
andNPM_TOKEN
as Environment variables
package.json
- Set
"version": "0.0.0-semantically-released"
- Configure repository url
.releaserc
Override default tag deployment, configure branches to trigger a release.
Commit messages
commitizen is used to create standard commit messages and is helpful using git cli
commitlint is used to lint the commit messages. This ensures that commit messages adhere to the standard format
IDE plugins are available as well