forked from watson-developer-cloud/discovery-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (45 loc) · 1.35 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
language: node_js
node_js:
- 12
addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves for cypress
- libgconf-2-4
branches:
only:
- master
- /^release\/.*/
- /^hotfix\/.*/
script:
- yarn lint
- yarn audit
- lerna run build
- lerna run storybook:build
- lerna run test
before_deploy:
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- git config --global push.default simple
- git config --global user.email "[email protected]"
- git config --global user.name "Watson Github Bot"
- git config remote.origin.url https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}
- git checkout $TRAVIS_BRANCH
# following https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow
deploy:
# do regular beta releases
- provider: script
script: npx lerna publish -y --conventional-prerelease --no-changelog --preid beta --dist-tag beta
skip_cleanup: true
on:
branch: master
# do release candidate releases
- provider: script
script: npx lerna publish -y --conventional-prerelease --no-changelog --preid rc --dist-tag rc
skip_cleanup: true
on:
all_branches: true
condition: ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} =~ ^release\/.*$
notifications:
email:
on_success: change
on_failure: always