ghreleases
Interact with the GitHub releases API.
API
list(auth, org, repo[, options], cb)
List all releases for a repo. Calls back with an array of releases.
const gh = const auth = token: '90230948aef88723eca2309880fea09789234' user: 'ralphtheninja'gh
GitHub docs.
getLatest(auth, org, repo[, options], cb)
Get latest release.
gh
GitHub docs.
getById(auth, org, repo, id[, options], cb)
Get data for a single release.
gh
GitHub docs.
getByTag(auth, org, repo, tag[, options], cb)
Get release by tag.
gh
GitHub docs.
create(auth, org, repo, data[, options], cb)
Create a release.
const data = tag_name: '1.2.3-test' name: 'Release name for 1.2.3-test' body: 'Body text of release goes here'gh
The release on GitHub would then look as follows:
GitHub docs
uploadAssets(auth, org, repo, release, files[, options], cb)
Upload assets to a release. Calls back with an array of results for each upload request.
- The
release
parameter accepts either a releaseid
,'latest'
or a valid ref, e.g.'tags/v1.0.0'
- The
files
parameter is an array of absolute file paths that should be uploaded and associated with this release
const ref = 'tags/v1.3.0'const files = '/path/to/README.md' '/path/to/prebuilt/binary.tar.gz'gh
GitHub docs
Also See
For interacting with other parts of the GitHub API, check out the modules below.
License
MIT