A Grunt task to publish release drafts on GitHub.
This task searches for a release draft with a given tag name. If the draft is found, the task attaches the tag (if it exists) to this release, then publishes the release.
You can install grunt-publish-github-drafts
by a following way:
> npm install --save-dev grunt-publish-github-drafts
Then you can add a configuration section for
publish_github_drafts
task in your Gruntfile.js
:
// If you don't use a `load-grunt-tasks` module,
// you should load `grunt-publish-github-drafts` directly.
grunt.loadNpmTasks('grunt-publish-github-drafts');
grunt.initConfig({
publish_github_drafts: {
owner: 'username/organization',
repo: 'repository name',
token: 'GitHub token',
tag: 'Tag to search',
}
});
- Create a new draft reserved for a new version,
and name it in a semver format, e.g.
v0.1.0
. - Update a description of the draft during development, if neccessary.
- When a new version is ready, push the tag to repository (
v0.1.0
in this case). - Then run this task, and it will apply the
v0.1.0
tag to the draft, and will publish it.
Licensed under the MIT License.