Webpack standard Automatic versioning and CHANGELOG management, using GitHub's new squash button and
the recommended workflow for conventional-changelog
.
- When you land commits on your
master
branch, select the Squash and Merge option. - Add a title and body that follows the conventional-changelog-standard conventions.
- Land It!
# npm run script
npm run release
# or global bin
standard-version
This will increment the package version based on commit history from the last tag, update the changelog accordingly, commits the changes & cuts a local tag
# commandline
git push --follow-tags origin master
Use the flag --prerelease
to generate pre-releases:
Example: Given the last version of the package is 1.0.0
, and your code to be committed has semver: patch
level changes...
# npm run script ( name === alpha, beta, rc )
npm run release -- --prerelease <name>
this will tag the version 1.0.1-alpha.0
To forgo the automated version bump use --release-as
with the argument major
, minor
or patch
:
Suppose the last version of your code is 1.0.0
, you've only landed fix:
commits, but
you would like your next release to be a minor
. Simply do:
# npm run script
npm run release -- --release-as minor
you will get version 1.1.0
rather than the auto generated version 1.0.1
.
NOTE: you can combine
--release-as
and--prerelease
to generate a release. This is useful when publishing experimental feature(s).
If you have your GPG key set up, add the --sign
or -s
flag to your standard-version
command.