-
Notifications
You must be signed in to change notification settings - Fork 754
/
.travis.yml
64 lines (64 loc) · 1.72 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: ">= 1.0.0"
language: node_js
node_js:
- "10"
os: linux
dist: xenial
arch: amd64
cache:
yarn: true
directories:
- node_modules
jobs:
include:
- stage: test
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn --frozen-lockfile
before_script:
- yarn run clean:component
- yarn run build:component
script:
- yarn run test:ci
- stage: release
if: "(tag =~ /^v3/) AND (NOT (type IN (pull_request)))"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn --frozen-lockfile
before_script:
- yarn run clean:component
script:
- yarn run build:component
before_deploy:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
deploy:
provider: script
skip_cleanup: true
script: "yarn run publish"
on:
tags: true
repo: NervJS/taro-ui
- stage: deploy
if: "(branch = master) AND (NOT (type IN (pull_request)))"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn --frozen-lockfile
before_script:
- yarn run clean
script:
- yarn run build
after_script:
- cd packages/taro-ui-docs/dist
- git init
- git add -A
- git commit -m "Update Document"
- git push --force --quiet "https://${GITHUB_TOKEN}@${GH_REF}" master:gh-pages
env:
global:
- GH_REF=github.com/NervJS/taro-ui.git