Skip to content

Commit 80bf089

Browse files
committed
chore: update travis config
1 parent 9e2bf62 commit 80bf089

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

.travis.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
language: node_js
22
node_js:
33
- "10"
4-
4+
os: linux
5+
dist: xenial
6+
arch: amd64
57
cache:
68
yarn: true
79
directories:
810
- node_modules
9-
1011
jobs:
1112
include:
12-
1313
- stage: test
1414
before_install:
1515
- curl -o- -L https://yarnpkg.com/install.sh | bash
@@ -21,9 +21,8 @@ jobs:
2121
- yarn run build:component
2222
script:
2323
- yarn run test:ci
24-
25-
- stage: deploy
26-
if: (branch = master) AND (NOT (type IN (pull_request)))
24+
- stage: release
25+
if: "(branch IN (master, ui-next)) AND (NOT (type IN (pull_request)))"
2726
before_install:
2827
- curl -o- -L https://yarnpkg.com/install.sh | bash
2928
- export PATH="$HOME/.yarn/bin:$PATH"
@@ -33,15 +32,32 @@ jobs:
3332
- yarn run clean
3433
script:
3534
- yarn run build
35+
before_deploy:
36+
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
3637
deploy:
37-
- yarn run publish
38-
after_deploy:
38+
provider: script
39+
skip_cleanup: true
40+
script: "yarn run publish"
41+
on:
42+
tags: true
43+
repo: NervJS/taro-ui
44+
- stage: deploy
45+
if: "(branch = master) AND (NOT (type IN (pull_request)))"
46+
before_install:
47+
- curl -o- -L https://yarnpkg.com/install.sh | bash
48+
- export PATH="$HOME/.yarn/bin:$PATH"
49+
install:
50+
- yarn --frozen-lockfile
51+
before_script:
52+
- yarn run clean
53+
script:
54+
- yarn run build
55+
after_script:
3956
- cd packages/taro-ui-docs/dist
4057
- git init
4158
- git add -A
4259
- git commit -m "Update Document"
4360
- git push --force --quiet "https://${GITHUB_TOKEN}@${GH_REF}" master:gh-pages
44-
4561
env:
4662
global:
47-
- GH_REF: github.com/NervJS/taro-ui.git
63+
- GH_REF=github.com/NervJS/taro-ui.git

0 commit comments

Comments
 (0)