Skip to content

Commit 549cfbd

Browse files
committed
feat(docs): semantic release and other CI integration
1 parent 8226938 commit 549cfbd

3 files changed

Lines changed: 52 additions & 18 deletions

File tree

.travis.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
language: node_js
2+
cache:
3+
directories:
4+
- ~/.npm
5+
notifications:
6+
email: false
27
node_js:
3-
- 9
4-
- 10
8+
- '10'
9+
- '9'
510

611
# S: Build Lifecycle
712
install:
813
- npm install
9-
1014
before_script:
1115
- echo "start"
12-
1316
script:
1417
- npm run lint
1518
- npm run build
16-
1719
after_script:
1820
- echo "done"
1921
# E: Build LifeCycle
2022

23+
after_success:
24+
- npm run travis-deploy-once "npm run semantic-release"
25+
- npx gh-pages -r https://"$GH_TOKEN"@github.com/clair-design/clair-design.github.io.git -b master -d .site
2126
branches:
22-
only:
23-
- master
24-
25-
env:
26-
global:
27-
28-
cache:
29-
directories:
30-
# - node_modules
27+
except:
28+
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ A design system including principles, Vue components and design resources.
99
## Document
1010

1111
- [clair.75team.com](https://clair.75team.com/) (recommended)
12-
- [clair.surge.sh](https://clair.surge.sh/)
12+
- [clair-design.github.io](https://clair-design.github.io)

package.json

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "clair",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "A design system including principles, Vue components and resources",
55
"main": "dist/clair.cjs.js",
66
"module": "dist/clair.es.js",
@@ -20,7 +20,10 @@
2020
"build": "run-s clean doc:build bundle rawcss",
2121
"start": "npm run doc:dev",
2222
"lint": "eslint -f node_modules/eslint-friendly-formatter --ext .js,.vue src docs",
23-
"rawcss": "postcss --no-map -u postcss-easy-import -u postcss-each -u postcss-for -o dist/clair.raw.css src/styles/raw.css"
23+
"rawcss": "postcss --no-map -u postcss-easy-import -u postcss-each -u postcss-for -o dist/clair.raw.css src/styles/raw.css",
24+
"travis-deploy-once": "travis-deploy-once",
25+
"semantic-release": "semantic-release",
26+
"cz": "git-cz"
2427
},
2528
"lint-staged": {
2629
"*.css": [
@@ -35,7 +38,7 @@
3538
},
3639
"repository": {
3740
"type": "git",
38-
"url": "git+https://github.com/clair-design/clair.git"
41+
"url": "https://github.com/clair-design/clair.git"
3942
},
4043
"keywords": [
4144
"Design",
@@ -49,12 +52,19 @@
4952
},
5053
"homepage": "https://github.com/clair-design/clair#readme",
5154
"devDependencies": {
55+
"@semantic-release/changelog": "^3.0.0",
56+
"@semantic-release/git": "^7.0.1",
57+
"@semantic-release/github": "^5.0.2",
58+
"@semantic-release/npm": "^5.0.2",
5259
"@vue/test-utils": "^1.0.0-beta.11",
5360
"cili": "^3.1.2",
61+
"commitizen": "^2.10.1",
5462
"cross-env": "^5.1.1",
63+
"cz-conventional-changelog": "^2.1.0",
5564
"eslint": "^5.3.0",
5665
"eslint-config-clair": "^1.0.0",
5766
"eslint-friendly-formatter": "^3.0.0",
67+
"gh-pages": "^1.2.0",
5868
"husky": "^0.14.3",
5969
"jest": "^22.1.2",
6070
"lint-staged": "^4.0.2",
@@ -70,8 +80,10 @@
7080
"rimraf": "^2.6.2",
7181
"rollup-plugin-require-context": "^0.0.2",
7282
"rollup-plugin-vue": "3.0.0",
83+
"semantic-release": "^15.9.9",
7384
"stylelint": "^8.3.1",
7485
"stylelint-config-standard": "^17.0.0",
86+
"travis-deploy-once": "^5.0.2",
7587
"vue-jest": "^1.4.0"
7688
},
7789
"dependencies": {
@@ -83,5 +95,29 @@
8395
},
8496
"peerDependencies": {
8597
"vue": "^2.5.16"
98+
},
99+
"config": {
100+
"commitizen": {
101+
"path": "./node_modules/cz-conventional-changelog"
102+
}
103+
},
104+
"release": {
105+
"noCi": true,
106+
"prepare": [
107+
"@semantic-release/changelog",
108+
"@semantic-release/npm",
109+
{
110+
"path": "@semantic-release/git",
111+
"assets": [
112+
"package.json",
113+
"CHANGELOG.md"
114+
],
115+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
116+
}
117+
],
118+
"publish": [
119+
"@semantic-release/npm",
120+
"@semantic-release/github"
121+
]
86122
}
87123
}

0 commit comments

Comments
 (0)