github-semantic-version
Automated semantic version releases powered by Github Issues.
Getting Started
1. Install
$ npm install --save-dev github-semantic-version
GH_TOKEN
& NPM_TOKEN
to CI
2. Add For example, in Travis CI's "Settings" tab for your project, you'll see:
For your GH_TOKEN
create one in Github
with repo
credentials.
You can find NPM_TOKEN
in your ~/.npmrc
file:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
3. Create labels
$ npm install --save-dev git-labelmaker
$ git-labelmaker? What is your GitHub Access Token? <paste token here>? What is your master password, to keep your access token secure? ************? Welcome to git-labelmaker!What would you like to do?> Add Labels From Package? What is the path & name of the package you want to use? ./node_modules/github-semantic-version/labels.jsonSuccessfully created 3 labels
4. Add labels to issues
Add one of the following labels to your open PRs:
Version: Major
Version: Minor
Version: Patch
As these get merged, github-semantic-version
will use this to determine
how to bump the current version.
If any un-tagged commits are pushed to master
outside of a PR, they're
automatically treated as patch
releases.
Once these are in place, your new versions can be pushed back to Github & NPM without permissions & security issues.
.travis.yml
5. Update sudo: falselanguage: node_jscache: directories: - node_modulesnotifications: email: falsebranches: except: - /^v[0-9]/deploy: provider: script script: npm run release skip_cleanup: true on: branch: master
package.json
6. Update
If you're working on an private project, you can leave out npm publish
, which
means you have no need for your NPM_TOKEN
either.
License
MIT License 2016 © Eric Clemmons