-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (32 loc) · 733 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
language: node_js
node_js:
- '10'
dist: dist
sudo: required
script:
- npm ci
- npm run test
- npm run build
cache:
pip: true
directories:
- node_modules
before_deploy:
- if [[ "$TRAVIS_PULL_REQUEST" = false && $TRAVIS_BRANCH == "master" ]]; then
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc;
fi
deploy:
provider: script
script: bash scripts/publish.sh
skip_cleanup: true
target-branch: $TRAVIS_BRANCH
on:
branches:
only:
- master
# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
- /^greenkeeper/.*$/