Skip to content

Commit

Permalink
doc some more
Browse files Browse the repository at this point in the history
  • Loading branch information
ungoldman committed Feb 8, 2015
1 parent 9516c77 commit 0d27124
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Create a release for a node package on github.

[![](https://nodei.co/npm/gh-release.png)](https://www.npmjs.com/package/gh-release)

Uses the [Github Releases API](https://developer.github.com/v3/repos/releases/) to create a new release using information from your `package.json` and `CHANGELOG.md`. Has strong defaults, relies on standards.

## Usage

### Node
Expand All @@ -18,7 +20,7 @@ var options = {
tag_name: 'v1.0.0',
target_commitish: 'master',
name: 'v1.0.0',
body: '* create working prototype\n* define basic node interface\n* define basic cli interface\n',
body: '* init\n',
draft: false,
prerelease: false,
repo: 'gh-release',
Expand All @@ -35,6 +37,10 @@ ghRelease(options, auth, function (err, result) {
})
```

All settings in `options` are optional (see [options](#options) for defaults).

`username` and `password` in `auth` are required. Ideally this will support a token in the future as well -- storing these things in plaintext as env vars or anything else is obviously a bad idea. Right now user & pass are mainly there to support the CLI prompt use case.

### CLI

Should be run at the root of the project to be released.
Expand Down Expand Up @@ -80,10 +86,6 @@ Override defaults with flags ([cli](#cli)) or the `options` object ([node](#node

All [releases](https://github.com/ngoldman/gh-release/releases) of `gh-release` were created with `gh-release`.

## Reference

* [github release api docs](https://developer.github.com/v3/repos/releases/)

## Motivation

There are packages that already do something like this, and they're great, but I want something that does this one thing really well and nothing else, leans heavily on standards in `package.json` and `CHANGELOG.md`, and can work both as a cli tool and programmatically in node. Mostly I want this to work well as a dependency in [versioneer](https://github.com/ngoldman/versioneer).
Expand Down

0 comments on commit 0d27124

Please sign in to comment.