-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
55 lines (46 loc) · 984 Bytes
/
.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
os:
- linux
- osx
language: node_js
node_js:
- '9'
- '10'
cache:
directories:
- node_modules
script:
- echo $TRAVIS_OS_NAME
- node --version
- npm --version
- npm test
after_success:
- if [ "$TRAVIS_OS_NAME" == 'linux' ]; then npm run coverage; fi
stages:
- test
- pack
- name: deploy
if: (type = push) AND branch =~ ^(master|v\d+\.\d+)$
jobs:
include:
- stage: pack
script:
- ./scripts/generate-version.sh
- npm run test:pack && echo 'Npm pack testing is passed'
- stage: deploy
before_deploy:
- echo "Deploying to NPM ..."
- npm version
- ./scripts/generate-version.sh
- ./scripts/package-publish-config-tag.sh
- npm run dist
deploy:
provider: npm
email: [email protected]
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
all_branches: true
notifications:
email:
on_success: change
on_failure: change