ggr

grunt-gh-release

Create relases on GitHub from Grunt task.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

4

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

0

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

grunt-gh-release

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:

grunt.loadNpmTasks('grunt-gh-release');

The “gh_release” task

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

grunt.initConfig({
  gh_release: {
    options: {
      // Credentials, required
      token: '...',
      owner: 'owner',
      repo: 'repo'
    },
    release: {
      // Release input
      // All options are optional, details: http://developer.github.com/v3/repos/releases/#input-1
      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: 'plugin-0.0.1.zip',
        file: 'product/plugin-0.0.1.zip',
        'Content-Type': 'application/zip' // Common media types: http://en.wikipedia.org/wiki/Internet_media_type#List_of_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:

grunt.initConfig({
  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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial