-
Notifications
You must be signed in to change notification settings - Fork 75
/
.travis.yml
67 lines (60 loc) · 1.59 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
65
66
67
language: node_js
node_js:
- '10'
install:
- echo "install successed"
os:
- linux
stages:
- test
- name: deploy
jobs:
include:
- stage: test
script:
- node --version
- npm --version
- echo "Testing Started ..."
- npm test
- echo "Testing Finished."
- stage: deploy
script:
- echo "NPM Deploying Started ..."
- cd ../
- rm -rf vue-hash-calendar/
- git clone https://${GH_REF}
- cd vue-hash-calendar
- git branch
- git checkout travis_build
- git merge master
- cd npm_package/
- npm version patch
- cd ../build_package/
- npm version patch
- cd ../
- npm install --registry=https://registry.npm.taobao.org
- npm run lib
- cp -f npm_package/package.json ./
- echo "NPM Building Finished."
deploy:
provider: npm
email: [email protected]
api_key: '$NPM_TOKEN' # NPM_TOKEN 是在 Travis 中配置的 npm token 的名称
skip_cleanup: true
on:
all_branches: true
after_script:
- cp -f build_package/package.json ./
- ls
- git config user.name "Travis"
- git config user.email "[email protected]"
- git add .
- git commit -m "Travis CI Auto Builder"
- git status
- git push "https://${GH_TOKEN}@${GH_REF}" travis_build:travis_build # GH_TOKEN 是在 Travis 中配置 github token 的名称
branches:
only:
- master
env:
global:
- GH_REF: github.com/TangSY/vue-hash-calendar.git #github仓库地址