Create relases on GitHub from Grunt task.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Create relases on GitHub from Grunt task.

Getting Started

This plugin requires Grunt ~0.4.1

If you havent used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you’re familiar with that process, you may install this plugin with this command:

npm install grunt-gh-release --save-dev

After that it may be enabled inside your Gruntfile with this line of JavaScript:


The “gh_release” task

In your project’s Gruntfile.js, add a section named gh_release to the data object passed into grunt.initConfig().

  gh_release: {
    options: {
      // Credentials, required
      token: '...',
      owner: 'owner',
      repo: 'repo'
    release: {
      // Release input
      // All options are optional, details:
      tag_name: '0.0.1',
      target_commitish: 'master',
      name: 'Initial release',
      body: 'Description of the release.',
      draft: false,
      prerelease: false,
      asset: {
        // Upload a release asset if needed
        name: '',
        file: 'product/',
        'Content-Type': 'application/zip' // Common media types:

API token

Create your own personal API token for use in the options.token. Be careful, token are like password so you should guard it carefully.

The best practice is to store token in separate gitignored-file, secret.json for example:

  "gh_token": "f682bb3c305f65d8f6cfffea29f2a7e2b8b0c11a"

…and then to read it in Gruntfile.js like so:

  gh_release: {
    options: {
      token: grunt.file.readJSON('secret.json').gh_token,
      owner: 'owner',
      repo: 'repo'
    release: { /**/ }

Release History

0.0.1, Oct 8 2013

Initial commit.