-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
56 lines (56 loc) · 1.29 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
language: node_js
if: tag IS blank
sudo: false
git:
depth: 1
node_js:
- 11
- 10
- 9
- 8
- 7
- 6
jobs:
include:
- stage: lint
install: ignore
script:
- npx standard
- stage: cover
script:
- npx nyc --reporter=text --reporter=lcov npm test
deploy:
- provider: script
skip_cleanup: true
script:
- npx nyc report --reporter=text-lcov | npx coveralls --verbose
- stage: push
if: branch = master
install: ignore
script:
- export NPM_PACKAGE=$(npm --silent pack)
after_success:
- export NPM_PACKAGE_VERSION=$(npm --silent run node -- --print process.env.npm_package_version)
- export NPM_RELEASE_VERSION=$(npm --silent view $PWD version)
- git tag --annotate $NPM_PACKAGE_VERSION --message $NPM_PACKAGE_VERSION
- git describe --tags --exact-match
- env
deploy:
- provider: npm
email: ivo.putzer@gmail.com
api_key: $NPM_TOKEN
on:
repo: $TRAVIS_REPO_SLUG
condition:
- $NPM_PACKAGE_VERSION != $NPM_RELEASE_VERSION
- provider: releases
skip_cleanup: true
overwrite: false
file: $NPM_PACKAGE
api_key: $GITHUB_API_KEY
on:
repo: $TRAVIS_REPO_SLUG
condition:
- $NPM_PACKAGE_VERSION != $NPM_RELEASE_VERSION
notifications:
email: false