Skip to content

Commit

Permalink
feat(release): add github release
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Aug 4, 2016
1 parent 44896e4 commit 564e1d5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ $ gulp build
6. Commit the version change & `CHANGELOG.md`
7. Create a git tag
8. Run `git push` to `upstream/master`
9. Publish a release to Github releases (if `GH_TOKEN` is available)
10. Publish to npm

```bash
# Major release
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"babel-preset-es2015": "^6.9.0",
"brfs": "^1.4.3",
"chalk": "^1.1.3",
"conventional-github-releaser": "^1.1.3",
"coveralls": "^2.11.12",
"eslint": "^3.2.0",
"eslint-config-standard": "^5.3.5",
Expand Down
23 changes: 23 additions & 0 deletions tasks/release/github.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict'

const $ = require('gulp-load-plugins')()
const conventionalGithubReleaser = require('conventional-github-releaser')

module.exports = (gulp, done) => {
const token = process.env.GH_TOKEN || $.util.env.token

if (!token) {
$.util.log($.util.colors.yellow(`
Skipping Github release as you are missing an oauth token.
You can supply one by either using $GH_TOKEN or --token.
`))
return done()
}

conventionalGithubReleaser({
type: 'oauth',
token
}, {
preset: 'angular'
}, done)
}
1 change: 1 addition & 0 deletions tasks/release/post-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = (gulp, done) => {
'release:changelog',
'release:commit',
'release:push',
'release:github',
'release:publish',
done
)
Expand Down

0 comments on commit 564e1d5

Please sign in to comment.