This commit automates our release process. It takes care of a couple of things:
- Bumps version number in package.json as needed, see below
- Generates changelog based on commit history
- Create release commit
- Tags release commit
- Pushes release commit including tags to upstream repository
- Publishes release on npm
There are a couple of options supported. The base command is run like this:
```
npm run release
```
This will do a minor bump and try to push to `origin` on `master`. However,
this can be altered with the following options.
```
npm run release -- --dry-run
```
Can be used to perform dry run and not actually committing, tagging, pushing,
publishing anything.
```
npm run release -- --release-as <something>
```
Something can be `minor`, `major`, `patch` or anything you want `foo`, `1.0.0` etc.
```
npm run release -- --prerelease alpha
```
Will create a prerelease version a la `4.0.0-alpha.x`.
```
npm run release -- --prerelease alpha --npm-dist-tag next
```
Publishes a dist tag on npm using dist tag `next`
```
npm run release -- --sign
```
Signs the release commit (you need to have PGP setup for that).
```
npm run release -- --repo-origin pascal --repo-branch foo/bar
```
Pushes the release commit into `pascal/foo/bar`.