Make a new GitHub release from git metadata
$ npm install -g conventional-github-releaser
$ cd my-project
$ conventional-github-releaser -p angular
The above generates a GitHub Release based on commits since the last semver tag that match the pattern of a "Feature", "Fix", "Performance Improvement" or "Breaking Changes".
If you first time use this tool and want to generate all previous releases, you could do
$ conventional-github-releaser -p angular -r 0
This will not overwrite the releases you have already made. Read "Regenerate all the releases" section if you want to.
All available command line parameters can be listed using CLI : conventional-github-releaser --help
.
Hint: You can alias your command or add it to your package.json. EG: "github-release": "conventional-github-releaser -p angular -r 0"
.
Or use one of the plugins if you are already using the tool: grunt/atom
- Make changes
- Commit those changes
- Make sure Travis turns green
- Bump version in
package.json
- Commit
package.json
files - Tag
- Push
conventionalGithubReleaser
You have to have a tag on GitHub to make a release. hence gitRawCommitsOpts.to
defaults to the latest semver tag.
Please use this gist to make a release or change it to your needs.
- https://github.com/stevemao/conventional-github-releaser/releases
- https://github.com/ajoslin/conventional-changelog/releases
- Based on conventional-changelog but GitHub releases are more elegant.
- Detecting prerelease based on semver, ignoring reverted commits, templating with handlebars.js and links to references, etc. Open an issue if you want more reasonable features.
- Intelligently setup defaults but you can still modify them to your needs.
- Fully configurable. There are many presets that you can use if you just want to use the same conventions. But it is also possible to configure if you want to go down to the nth degree.
- Everything internally or externally is pluggable.
- High performant. It doesn't spawn any extra child process to fetch data.
- A lot of tests and actively maintained.
$ npm install --save conventional-github-releaser
var conventionalGithubReleaser = require('conventional-github-releaser');
var AUTH = {
type: "oauth",
token: '0126af95c0e2d9b0a7c78738c4c00a860b04acc8'// change this to your own GitHub token or use an environment variable
};
conventionalGithubReleaser(AUTH, {
preset: 'angular'
}, callback);
conventionalGithubReleaser(auth, [changelogOpts, [context, [gitRawCommitsOpts, [parserOpts, [writerOpts]]]]], callback)
An auth object passed to node-github.
Type: array
An array of responses returned by github.releases.createRelease
calls.
Please check conventional-changelog for other arguments.
There are some changes:
Default: grab the whole tag for the version (including a leading v) and format date.
Default: 1
How many releases of changelog you want to generate. It counts from the latest semver tag. Useful when you forgot to generate any previous releases. Set to 0
to regenerate all.
Default: based on options.releaseCount
.
Default: latest semver tag
It is always true
.
If there is any preset, this defaults to ''
because header in presets usually contains the version and date which are already in the release.
$ npm install --global conventional-github-releaser
$ conventional-github-releaser --help # for more details
You can supply your auth token by a flag -t
or --token
. You can also set up an environment variable CONVENTIONAL_GITHUB_RELEASER_TOKEN
to avoid typing your token every time.
Use github-remove-all-releases to remove all releases and set changelogOpts.releaseCount
to 0
to regenerate.
Create a new token and set your environment variable CONVENTIONAL_GITHUB_RELEASER_TOKEN
to the token you just created. You can google How to set environment variable. The scopes for the token you need is public_repo
or repo
(if you need to access private repos). More details.
- conventional-changelog - Generate a changelog from git metadata
- conventional-recommended-bump - Get a recommended version bump based on conventional commits
- github-remove-all-releases - Remove all releases of your GitHub repo
- conventional-commits-detector - Detect what commit message convention your repository is using
MIT © Steve Mao