Skip to content

Commit 2e1d838

Browse files
Added a deployment job to publish tagged releases to npm
1 parent a1a8ed5 commit 2e1d838

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# https://docs.travis-ci.com/user/customizing-the-build/
44
# https://docs.travis-ci.com/user/migrating-from-legacy/
55

6+
filter_secrets: false
67
language: node_js
78

89
node_js:
@@ -20,3 +21,18 @@ script: npm run lint && npm run coverage
2021
after_success:
2122
# send code-coverage data to Coveralls
2223
- cat ./coverage/lcov.info | coveralls
24+
25+
jobs:
26+
include:
27+
- stage: Deploy
28+
name: Publish to npm
29+
script: true
30+
after_success: true
31+
deploy:
32+
provider: npm
33+
email: $NPM_EMAIL
34+
api_key: $NPM_API_KEY
35+
skip_cleanup: true
36+
on:
37+
tags: true
38+
branch: master

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"coverage": "nyc --reporter=text --reporter=lcov mocha",
3030
"upgrade": "npm-check -u",
3131
"bump": "bump --prompt --tag --push --all",
32-
"release": "npm run upgrade && npm run test && npm run bump && npm publish"
32+
"release": "npm run upgrade && npm run test && npm run bump"
3333
},
3434
"devDependencies": {
3535
"browserify": "^16.2.3",

0 commit comments

Comments
 (0)