|
| 1 | +# Webpack merge, tag and release process |
| 2 | + |
| 3 | +Webpack standard Automatic versioning and CHANGELOG management, using GitHub's new squash button and |
| 4 | +the [recommended workflow](https://github.com/conventional-changelog/conventional-changelog-cli#recommended-workflow) for `conventional-changelog`. |
| 5 | + |
| 6 | +## Pull requests into `master` |
| 7 | + |
| 8 | +1. When you land commits on your `master` branch, select the _Squash and Merge_ option. |
| 9 | +2. Add a title and body that follows the [conventional-changelog-standard conventions](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md). |
| 10 | +3. Land It! |
| 11 | + |
| 12 | +## Cut a standard release |
| 13 | + |
| 14 | +```sh |
| 15 | +# npm run script |
| 16 | +npm run release |
| 17 | +# or global bin |
| 18 | +standard-version |
| 19 | +``` |
| 20 | + |
| 21 | +_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**_ |
| 22 | + |
| 23 | +### When satisfied with the local tag, push it up to master. |
| 24 | + |
| 25 | +```sh |
| 26 | +# commandline |
| 27 | +git push --follow-tags origin master |
| 28 | +``` |
| 29 | + |
| 30 | +## Cut a pre-release |
| 31 | + |
| 32 | +Use the flag `--prerelease` to generate pre-releases: |
| 33 | + |
| 34 | +_Example: Given the last version of the package is `1.0.0`, and your code to be committed has `semver: patch` level changes..._ |
| 35 | + |
| 36 | +```bash |
| 37 | +# npm run script ( name === alpha, beta, rc ) |
| 38 | +npm run release -- --prerelease <name> |
| 39 | +``` |
| 40 | + |
| 41 | +_this will tag the version `1.0.1-alpha.0`_ |
| 42 | + |
| 43 | +## Cut a target release version imperatively like `npm version` |
| 44 | + |
| 45 | +To forgo the automated version bump use `--release-as` with the argument `major`, `minor` or `patch`: |
| 46 | + |
| 47 | +Suppose the last version of your code is `1.0.0`, you've only landed `fix:` commits, but |
| 48 | +you would like your next release to be a `minor`. Simply do: |
| 49 | + |
| 50 | +```bash |
| 51 | +# npm run script |
| 52 | +npm run release -- --release-as minor |
| 53 | +``` |
| 54 | + |
| 55 | +_you will get version `1.1.0` rather than the auto generated version `1.0.1`._ |
| 56 | + |
| 57 | +> **NOTE:** you can combine `--release-as` and `--prerelease` to generate a release. This is useful when publishing experimental feature(s). |
| 58 | +
|
| 59 | +## Signing commits and tags |
| 60 | + |
| 61 | +If you have your GPG key set up, add the `--sign` or `-s` flag to your `standard-version` command. |
0 commit comments