-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
66 lines (60 loc) · 1.57 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
language: node_js
node_js:
- '12'
- '10'
- '8'
os:
- linux
- osx
git:
depth: false
cache:
directories:
- $HOME/.npm
- node_modules
- packages/*/node_modules
stages:
- name: compile
- name: lint
- name: test
# - name: nightly
# if: type = cron AND branch = develop
- name: publish
if: branch = master AND type = push AND tag IS blank
jobs:
include:
- stage: compile
name: 'Compile'
script: npm run build
before_script:
- echo "$TRAVIS_EVENT_TYPE"
- echo "$TRAVIS_COMMIT"
- echo "$TRAVIS_BRANCH"
- echo "$TRAVIS_TAG"
- stage: lint
name: 'Code Lint'
script: npm run lint
# - stage: nightly
# name: 'Nightly Build'
# script:
# - npm run build
# - lerna publish --yes --canary --preid nightly.$TRAVIS_BUILD_ID --dist-tag nightly
# before_script:
# - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
- stage: publish
name: 'Publish'
script:
- npm run build
- lerna version --github-release --conventional-commits --yes
- lerna publish from-git --yes
before_script:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
- git config user.email $GH_EMAIL
- git config user.name $GH_NAME
- git remote set-url origin https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
- git checkout master
after_script:
- git fetch
- git checkout -t origin/develop
- git merge master
- git push