Skip to content

Commit af9a990

Browse files
authored
Add semantic release (#316)
* chore(release): Add semantic release * chore: updates build deps
1 parent d469ec8 commit af9a990

File tree

4 files changed

+2226
-79
lines changed

4 files changed

+2226
-79
lines changed

.travis.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
sudo: false
2-
32
language: node_js
43
node_js:
54
- stable
5+
cache: yarn
6+
script:
7+
- commitlint-travis
8+
- yarn test
69

7-
cache:
8-
yarn: true
9-
directories:
10-
- node_modules
11-
10+
after_success:
11+
- npm run semantic-release
1212
branches:
1313
only:
1414
- master

commitlint.config.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const types = [
2+
'build',
3+
'chore',
4+
'ci',
5+
'docs',
6+
'feat',
7+
'fix',
8+
'perf',
9+
'refactor',
10+
'revert',
11+
'style',
12+
'test',
13+
]
14+
15+
module.exports = {
16+
extends: ['@commitlint/config-angular'],
17+
rules: {
18+
'header-max-length': [0],
19+
'scope-case': [0],
20+
'subject-case': [0],
21+
'subject-full-stop': [0],
22+
'type-case': [0],
23+
'type-enum': [2, 'always', types],
24+
},
25+
}

package.json

+31-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"test": "npm run lint && npm run testonly",
88
"testonly": "jest --verbose",
99
"tdd": "jest --watch",
10+
"commitmsg": "commitlint -e $GIT_PARAMS",
1011
"build": "rimraf lib && babel src --out-dir lib && npm run build:dist && cp README.md LICENSE ./lib",
1112
"build:docs": "npm -C www run build",
1213
"build:dist": "rimraf lib/dist && webpack && NODE_ENV=production webpack -p",
@@ -17,11 +18,13 @@
1718
"deploy-docs": "npm -C www run deploy",
1819
"start": "npm -C www run develop",
1920
"storybook": "start-storybook -p 6006",
20-
"build-storybook": "build-storybook"
21+
"build-storybook": "build-storybook",
22+
"travis-deploy-once": "travis-deploy-once",
23+
"semantic-release": "semantic-release"
2124
},
2225
"repository": {
2326
"type": "git",
24-
"url": "git+https://github.com/reactjs/react-transition-group.git"
27+
"url": "https://github.com/reactjs/react-transition-group.git"
2528
},
2629
"keywords": [
2730
"react",
@@ -52,11 +55,20 @@
5255
"react-dom": ">=15.0.0"
5356
},
5457
"dependencies": {
58+
"@semantic-release/github": "^4.2.8",
5559
"dom-helpers": "^3.2.0",
5660
"loose-envify": "^1.3.1",
5761
"prop-types": "^15.5.8"
5862
},
5963
"devDependencies": {
64+
"@commitlint/cli": "^6.1.3",
65+
"@commitlint/config-angular": "^6.1.3",
66+
"@commitlint/prompt": "^6.1.3",
67+
"@commitlint/prompt-cli": "^6.1.3",
68+
"@commitlint/travis-cli": "^6.1.3",
69+
"@semantic-release/changelog": "^2.0.1",
70+
"@semantic-release/git": "^4.0.1",
71+
"@semantic-release/npm": "^3.2.4",
6072
"@storybook/addon-actions": "^3.2.11",
6173
"@storybook/react": "^3.2.11",
6274
"babel-cli": "^6.24.0",
@@ -87,12 +99,27 @@
8799
"react-test-renderer": "^16.0.0",
88100
"release-script": "^1.0.2",
89101
"rimraf": "^2.6.1",
102+
"semantic-release": "^15.1.4",
103+
"semantic-release-alt-publish-dir": "^2.1.0",
90104
"sinon": "^2.1.0",
105+
"travis-deploy-once": "^4.4.1",
91106
"webpack": "^3.6.0",
92107
"webpack-atoms": "^3.0.2"
93108
},
94-
"release-script": {
95-
"altPkgRootFolder": "lib"
109+
"release": {
110+
"pkgRoot": "lib",
111+
"verifyConditions": [
112+
"@semantic-release/changelog",
113+
"semantic-release-alt-publish-dir",
114+
"@semantic-release/git",
115+
"@semantic-release/github"
116+
],
117+
"prepare": [
118+
"@semantic-release/changelog",
119+
"semantic-release-alt-publish-dir",
120+
"@semantic-release/npm",
121+
"@semantic-release/git"
122+
]
96123
},
97124
"browserify": {
98125
"transform": [

0 commit comments

Comments
 (0)