forked from shipshapecode/tether
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
100 lines (91 loc) · 2.64 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
language: node_js
node_js:
- '10'
sudo: false
dist: xenial
env:
global:
- secure: "cQfF2hpLAEqin8kyqGLarmET86eVuOgctPnayWrrtLnWyN23OJ+QF0haqS9TV50D7BleBajPD803Ame9IZ8eSFG93BrTEiV7l+aNdTbO4bpcljtoV2XwIp5NHWg42PvHBYlRNJFBTUNPdIi1GEfFm78A+lFL6ks0cH17P1YrBms="
addons:
apt:
packages:
- libgconf-2-4
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
cache:
yarn: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache
install:
- yarn install --ignore-engines
stages:
- test
- name: npm-release
if: (tag =~ ^v)
- name: github-releases
if: (tag =~ ^v)
jobs:
include:
- stage: test
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- yarn test
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- stage: npm-release
script:
- yarn build
# Identifies `a.b.c-xxx.n` tags as pre-releases, and `a.b.c` as stable releases
before_deploy: |
function npm_dist_tag() {
if [[ "$TRAVIS_TAG" = *"-"* ]]; then
echo "next"
else
echo "latest"
fi
}
deploy:
provider: npm
tag: $(npm_dist_tag)
email: [email protected]
skip_cleanup: true
api_key:
secure: "P6U27xjFIXElcj4PNG8UTYbl8/Wm5wdqSPLxGYnY+aZ6qNqDMPvEGIjKOIqSK9sHrNB8QtdRmk52ANkd6BW+8qGZLf81k2J5ARLaMGfEf1fya3a/gdrbT39+eZB0KPfsdS7NNph2YB0NONQ0dyW5MN8BpwsPUG9ME5wSOHfv/80="
on:
branch: master
tags: true
repo: shipshapecode/tether
after_deploy: |
if [ "$(npm_dist_tag)" == "latest" ]; then
npm dist-tag rm tether next || true
fi
- stage: github-releases
script:
- yarn build
# Identifies `a.b.c-xxx.n` tags as pre-releases, and `a.b.c` as stable releases
before_deploy: |
function gh_prerelease() {
if [[ "$TRAVIS_TAG" = *"-"* ]]; then
echo true
else
echo false
fi
}
deploy:
provider: releases
api_key:
secure: "YY00lp8nCbyKrrGgJCMwle+Oiwi0D2dprmZNW9VTXNykriZDcWp/q1/P+OX+FDlp24J9pQngv4irfCD34hSpS7CyDUR1iVPs3Na4BRfdcHWP1OHVvekWYX5ngELERW65QhCv5VrxO7jeSe6ZUIuoQ9DToPNcsQurLXh4jXAe7UI="
file_glob: true
file:
- dist/css/*
- dist/js/*
skip_cleanup: true
prerelease: $(gh_prerelease)
on:
tags: true