Skip to content

Commit 9101533

Browse files
committed
setup semantic release
1 parent 170e60e commit 9101533

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.travis.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
language: node_js
2-
node_js:
3-
- "0.10"
4-
- "0.12"
5-
- "4"
6-
branches:
7-
only:
8-
- master
9-
script:
10-
- npm test
1+
sudo: false
2+
language: node_js
3+
cache:
4+
directories:
5+
- node_modules
6+
notifications:
7+
email: false
8+
node_js:
9+
- '4'
10+
before_install:
11+
- npm i -g npm@^2.0.0
12+
before_script:
13+
- npm prune
14+
after_success:
15+
- npm run semantic-release
16+
branches:
17+
except:
18+
- "/^v\\d+\\.\\d+\\.\\d+$/"

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@bahmutov/parse-github-repo-url",
33
"description": "Parse a GitHub URL for user/project@version",
4-
"version": "1.1.0",
4+
"version": "0.0.0-semantic-release",
55
"author": {
66
"name": "Jonathan Ong",
77
"email": "[email protected]",
@@ -17,10 +17,12 @@
1717
"url": "https://github.com/bahmutov/obind.git"
1818
},
1919
"devDependencies": {
20-
"mocha": "1"
20+
"mocha": "2.3.4",
21+
"semantic-release": "4.3.5"
2122
},
2223
"main": "index.js",
2324
"scripts": {
24-
"test": "mocha --reporter spec --bail"
25+
"test": "mocha --reporter spec --bail",
26+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
2527
}
2628
}

0 commit comments

Comments
 (0)