Most of my projects rely on Conventional Commits for releasing. But because the setup is repetitive, I decided to automate the process.
So in the past, I would manually:
- set up commitlint:
- which checks if my commit messages meet the conventional commits format (this information is key when generating a release)
- add husky:
- which lints the commit message via a Git hook
- and include standard-version:
- which bumps the version and generate the CHANGELOG
Now I run the executable and it does all that for me.
If the binary is installed globally, you can execute it like so:
npm install --global conventional-release-setup conventional-release-setup
Otherwise, execute it with npx:
For your first release, it’s recommended to do the following:
git stash npx standard-version --release-as 1.1.0 git stash pop
See standard-version > First Release for more details.
You can find
Feel free to check out the GitHub repository.