Grunt module to publish release notes based on commits between two tags. This module is using github-release-notes.
This plugin requires Grunt ~0.4.5 and github-release-notes ^0.5.0
npm install grunt-github-release-notes --save-devOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-github-release-notes');Before you can use it, you need to set up a couple of things.
gren by default looks for your local git configuration to get the repo informations. This means you can run the command directly from the git repo folder.
Otherwise, you can run it from wherever and specify a different repo as target, with:
options: {
username: USERNAME,
repo: REPO_NAME
}To work, gren needs a github token (that can be easily generated following this link). You only need "repo" scope.
Once generated, you can run the gren command with the token as variable:
options: {
token: YOUR_TOKEN_HERE
}Or you can add it to your ~/.bash_profile or ~/.zshrc) as follows:
export GREN_GITHUB_TOKEN=your_token_hereThe options are the same as github-release-notes, in camelCase:
tags: 0.1.0|0.2.0,0.1.0A specific tag or the range of tags to build the release notes from.timeWrap: latest|historyThe release notes you want to include in the changelog. Default:latestOnly applicable to thechangelogactionchangelogFilename: CHANGELOG.mdThe name of the changelog file. Default:CHANGELOG.mddataSource: issues|commitsThe informations you want to use to build release notes. Default:issuesdraft: true|falseTo set the release as a draft. Default:falseprerelease: true|falseTo set the release as a prerelease. Default:falseprefix: vAdd a prefix to the tag versione.g. v1.0.1. Default:nullincludeMessages: merges|commits|allused to filter the messages added to the release notes. Default:commitsoverride: true|falseOverride the release notes if existing. Default:false
The module accepts two targets: release and changelog.
The release task will generate the last release, while the changelog will add the release notes to the changelog (without committing the file);
gren: {
release: {
options: {
prefix: 'v'
}
},
changelog: {
options: {
changelogFilename: 'CHANGELOG.md'
}
}
}