From 247176d2835c3ed018a3b21ec623deff411d0098 Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Tue, 11 Aug 2015 11:38:29 +1000 Subject: [PATCH 1/2] chore(deps): bump grunt-conventional-changelog There are a ton of bug fixes and nice new features. --- Gruntfile.js | 12 ++++++++---- package.json | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1a69f73..88eca82 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -76,10 +76,14 @@ module.exports = function (grunt) { } }, - changelog: { + conventionalChangelog: { options: { - repository: 'http://github.com/showdownjs/showdown', - dest: 'CHANGELOG.md' + changelogOpts: { + preset: 'angular' + } + }, + release: { + src: 'CHANGELOG.md' } }, @@ -163,7 +167,7 @@ module.exports = function (grunt) { grunt.registerTask('lint', ['jshint', 'jscs']); grunt.registerTask('test', ['clean', 'lint', 'concat:test', 'simplemocha:node', 'clean']); grunt.registerTask('build', ['test', 'concat:dist', 'uglify']); - grunt.registerTask('prep-release', ['build', 'changelog']); + grunt.registerTask('prep-release', ['build', 'conventionalChangelog']); // Default task(s). grunt.registerTask('default', ['test']); diff --git a/package.json b/package.json index 07327fd..390f1eb 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "grunt-contrib-concat": "^0.5.0", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.6.0", - "grunt-conventional-changelog": "^1.1.0", + "grunt-conventional-changelog": "^4.0.0", "grunt-jscs": "^1.2.0", "grunt-simple-mocha": "^0.4.0", "js-beautify": "^1.5.6", From 22e3d644e1a132304da9ff39d1e12a8845a1aadb Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Tue, 11 Aug 2015 11:37:51 +1000 Subject: [PATCH 2/2] feat(release): use grunt-conventional-github-releaser You need to set environment variable `GH_TOKEN` as your github token and make sure you run it after you have pushed your tag. --- Gruntfile.js | 14 ++++++++++++++ package.json | 1 + 2 files changed, 15 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 88eca82..989fa0b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -87,6 +87,20 @@ module.exports = function (grunt) { } }, + conventionalGithubReleaser: { + release: { + options: { + auth: { + type: 'oauth', + token: process.env.GH_TOEKN + }, + changelogOpts: { + preset: 'angular' + } + }, + } + }, + simplemocha: { node: { src: 'test/node/**/*.js', diff --git a/package.json b/package.json index 390f1eb..8e3ee64 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.6.0", "grunt-conventional-changelog": "^4.0.0", + "grunt-conventional-github-releaser": "^0.3.0", "grunt-jscs": "^1.2.0", "grunt-simple-mocha": "^0.4.0", "js-beautify": "^1.5.6",