Skip to content

Commit 9e2bf62

Browse files
committed
chore: upgrade workflow
1 parent acfe777 commit 9e2bf62

File tree

5 files changed

+35
-11
lines changed

5 files changed

+35
-11
lines changed

.travis.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,42 @@ node_js:
33
- "10"
44

55
cache:
6+
yarn: true
67
directories:
78
- node_modules
89

910
jobs:
1011
include:
12+
1113
- stage: test
14+
before_install:
15+
- curl -o- -L https://yarnpkg.com/install.sh | bash
16+
- export PATH="$HOME/.yarn/bin:$PATH"
1217
install:
13-
- npm install
18+
- yarn --frozen-lockfile
19+
before_script:
20+
- yarn run clean:component
21+
- yarn run build:component
1422
script:
15-
- npm run test:ci
23+
- yarn run test:ci
24+
1625
- stage: deploy
1726
if: (branch = master) AND (NOT (type IN (pull_request)))
27+
before_install:
28+
- curl -o- -L https://yarnpkg.com/install.sh | bash
29+
- export PATH="$HOME/.yarn/bin:$PATH"
1830
install:
19-
- npm install
31+
- yarn --frozen-lockfile
32+
before_script:
33+
- yarn run clean
2034
script:
21-
- npm run build:doc
22-
after_script:
23-
- cd site
35+
- yarn run build
36+
deploy:
37+
- yarn run publish
38+
after_deploy:
39+
- cd packages/taro-ui-docs/dist
2440
- git init
25-
- echo 'taro-ui.aotu.io' > CNAME
26-
- git add .
41+
- git add -A
2742
- git commit -m "Update Document"
2843
- git push --force --quiet "https://${GITHUB_TOKEN}@${GH_REF}" master:gh-pages
2944

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
],
55
"version": "independent",
66
"npmClient": "yarn",
7-
"usingWorkspaces": true
7+
"useWorkspaces": true
88
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
]
1616
},
1717
"scripts": {
18-
"build": "lerna run build"
18+
"bootstrap": "lerna bootstrap",
19+
"build": "lerna run build",
20+
"build:component": "lerna run --scope taro-ui build",
21+
"clean": "lerna run clean",
22+
"clean:component": "lerna run --scope taro-ui clean",
23+
"publish": "lerna publish from-git --yes"
1924
},
2025
"devDependencies": {
2126
"@commitlint/cli": "^8.3.5",

packages/taro-ui-demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"dev:h5": "yarn run build:h5 --watch",
3333
"dev:rn": "yarn run build:rn --watch",
3434
"dev:qq": "yarn run build:qq --watch",
35-
"dev:quickapp": "yarn run build:quickapp --watch"
35+
"dev:quickapp": "yarn run build:quickapp --watch",
36+
"clean": "rimraf .temp dist"
3637
},
3738
"browserslist": [
3839
"last 3 versions",

packages/taro-ui/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
"url": "[email protected]:nervjs/taro-ui.git"
2929
},
3030
"license": "MIT",
31+
"publishConfig": {
32+
"tag": "next"
33+
},
3134
"scripts": {
3235
"dev": "yarn run dev:lib",
3336
"dev:lib": "tsc --project ./tsconfig.build.json --watch --incremental",

0 commit comments

Comments
 (0)