-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
44 lines (44 loc) · 968 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
language: node_js
if: tag IS blank
node_js:
- "8"
services:
- docker
cache:
directories:
- node_modules
script:
- npm run lint
- npm run build
before_deploy:
- >
if [ "$TRAVIS_BRANCH" != "master" ]; then
sed -i -e "s/\(\"version\":\\s\+\"\([0-9]\+\.\?\)\+\)/\1-pre.$TRAVIS_BUILD_NUMBER/" package.json;
fi;
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
git config --local user.name "$git_user";
git config --local user.email "$git_email";
git tag "$(node -p 'require(`./package.json`).version')";
fi;
deploy:
- provider: npm
email: $auth_email
api_key: $auth_token
edge: true
skip_cleanup: true
on:
branch: master
- provider: npm
email: $auth_email
api_key: $auth_token
edge: true
skip_cleanup: true
tag: next
on:
branch: develop
- provider: releases
api_key: $git_token
skip_cleanup: true
on:
branch: master