Skip to content

Commit

Permalink
chore(release): Add semantic release to the CI process
Browse files Browse the repository at this point in the history
Travis-CI now runs semantic release at the end of the build process, which will calculate the next
version to publish based on conventional commits and publish it to npm. It will also tag the version
and generate changelog notes on github.
  • Loading branch information
BenoitAverty committed Jun 13, 2016
1 parent e4d6713 commit ed7a8e0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
16 changes: 14 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "node"
- '6'
- '5'
- '4'
before_script:
- npm prune
script:
- npm run test
- npm run build
after_success:
- npm run semantic-release
branches:
only:
- master
2 changes: 1 addition & 1 deletion examples.webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { join } = require('path');
const join = require('path').join;

module.exports = {
entry: {
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "reactive-goban",
"version": "0.1.1",
"version": "0.0.0-semantic-release",
"description": "A Javascript representation of a Go game and a React component able to render it",
"main": "./dist/index.js",
"main": "./lib/index.js",
"directories": {
"test": "test"
},
Expand All @@ -16,11 +16,12 @@
"build:umd": "webpack --config umd-build.webpack.config.js --output-filename reactive-goban.js",
"build:umd.min": "webpack -p --config umd-build.webpack.config.js --output-filename reactive-goban.min.js",
"prepublish": "in-install || npm run build",
"clean": "rimraf dist lib"
"clean": "rimraf dist lib",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git+https://github.com/BenoitAverty/reactive-goban.git"
"url": "https://github.com/BenoitAverty/reactive-goban.git"
},
"keywords": [
"Go",
Expand Down Expand Up @@ -58,7 +59,8 @@
"npm-run-all": "^2.1.2",
"rimraf": "^2.5.2",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
"webpack-dev-server": "^1.14.1",
"semantic-release": "^4.3.5"
},
"dependencies": {
"@cycle/dom": "^9.4.0",
Expand Down
2 changes: 1 addition & 1 deletion umd-build.webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { join } = require('path');
const join = require('path').join;

module.exports = {
entry: './src/index.js',
Expand Down

0 comments on commit ed7a8e0

Please sign in to comment.