Add semantic-release to improve the workflow
See original GitHub issueRecently I’ve used semantic-release on three packages I own. It’s a pretty cool tool that enforces good versioning practices, as well as conventionally-formatted commit messages, etc.
Main features:
- Automatic publish on npm after the Travis build succeeds ;
- Version management of the package: no need to calculate what will be the next version by hand, semantic-release parses the commit messages (documentation) and sets the new version ;
- Generates a changelog and creates a GitHub release with it. Also tags a version on git. See an example of the generated output here.
Example of commit messages, given that the current version is 1.0.0 and the push is done before any other commit:
fix(some_module): no longer display things that souldn't be displayed
bumps the version to 1.0.1
feat(some_module): implement things
bumps the version to 1.1.0
feat(some_module): move to a fluent API
BREAKING CHANGE: the ancient API no longer exists.
bumps the version to 2.0.0
Now you can create a new branch for a new feature (ie. a PR) and do that:
fix(some_module): fix things up
feat(another_module): add myMetyhod()
feat(another_module): added a new alert type
When the branch gets merged into master, semantic-release will bump from 1.0.0 to 1.1.0. Which is exactly how things should be. It’s exactly what we’re doing now, but standardized and automated.
We could also use commitizen with it to enforce good commit messages (we’ll need to warn our contributors to respect those guidelines).
I’m volunteer to sumbit a PR that adds semantic-release to our workflow (just a few lines of configuration, no CLI tool to run evertime, it’s fully automated and runs on Travis). Your thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:20 (20 by maintainers)
It has nothing to do with commitizen and semantic-release. Apparently, I was young and foolish year ago when I was depending on
"latest"
versions of devDeps.Opened an issue for myself: https://github.com/sweetalert2/sweetalert2/issues/859
semantic-release
is taking care of SweetAlert2 releasing process now 🎉KILL ALL HUMANS 🤖