Skip to content

Commit b5bcf7d

Browse files
authored
Merge pull request #82 from halfzebra/semantic-release-travis
ci(release): Added better Travis CI config
2 parents 91749ad + d9d3b78 commit b5bcf7d

File tree

3 files changed

+833
-208
lines changed

3 files changed

+833
-208
lines changed

.travis.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
language: node_js
2-
node_js:
3-
- 4
4-
- 6
5-
62
sudo: required
3+
node_js:
4+
- '7'
5+
- '6'
6+
- '4'
77
before_install: # if "install" is overridden
88
# Repo for Yarn
99
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
1010
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
1111
- sudo apt-get update -qq
1212
- sudo apt-get install -y -qq yarn
13-
13+
script: npm test
1414
cache:
1515
yarn: true
1616
directories:
17-
- $HOME/.yarn-cache
18-
- node_modules
19-
17+
- $HOME/.yarn-cachegi
2018
install:
21-
- yarn install
19+
- yarn
2220
- npm link ../create-elm-app
23-
24-
script: npm test
25-
21+
before_script:
22+
- npm prune
23+
after_success:
24+
- npm run semantic-release
25+
branches:
26+
except:
27+
- /^v\d+\.\d+\.\d+$/
2628
notifications:
27-
email:
28-
29+
email: false

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-elm-app",
3-
"version": "0.2.1",
3+
"version": "0.0.0-development",
44
"description": "Elm apps with zero configuration",
55
"keywords": [
66
"elm",
@@ -17,10 +17,12 @@
1717
"create-elm-app": "./bin/create-elm-app-cli.js"
1818
},
1919
"scripts": {
20+
"commit": "git-cz",
2021
"precommit": "./node_modules/.bin/eslint bin/ config/ scripts/ tests/",
2122
"test": "npm run -s test:cli && npm run -s test:functional",
2223
"test:functional": "mocha tests/*.spec.js --reporter spec --timeout 15000",
23-
"test:cli": "mocha tests/cliAccessibility.js --reporter spec --timeout 15000"
24+
"test:cli": "mocha tests/cliAccessibility.js --reporter spec --timeout 15000",
25+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
2426
},
2527
"repository": {
2628
"type": "git",
@@ -69,10 +71,17 @@
6971
},
7072
"devDependencies": {
7173
"chai": "^3.5.0",
74+
"cz-conventional-changelog": "^1.2.0",
7275
"dir-compare": "^1.3.0",
7376
"eslint": "^3.12.2",
7477
"husky": "^0.11.9",
7578
"mocha": "^3.2.0",
76-
"rimraf": "^2.5.4"
79+
"rimraf": "^2.5.4",
80+
"semantic-release": "^6.3.2"
81+
},
82+
"config": {
83+
"commitizen": {
84+
"path": "./node_modules/cz-conventional-changelog"
85+
}
7786
}
7887
}

0 commit comments

Comments
 (0)