forked from sapegin/mrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (34 loc) · 1.03 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
language: node_js
node_js:
- 12
- 10
cache:
directories:
- node_modules
# Trigger a push build on master branches only + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
before_script: npm run bootstrap
script: npm run test
stages:
- coverage
- name: release
if: type != pull_request AND branch = master
jobs:
include:
- stage: coverage
script:
- npm run test:coverage
- 'bash <(curl -s https://codecov.io/bash)'
- stage: release
script:
- git config --global user.name "Mrm Bot"
- git config --global user.email "${BOT_EMAIL}"
- git remote set-url origin "https://${GH_TOKEN}@github.com/sapegin/mrm.git" > /dev/null 2>&1
- git checkout master
- git reset --hard
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
- npx lerna version --yes --create-release=github
- npx lerna publish from-git --yes