Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Deploy in separate stage
This separates the deploy stage from the matrix of builds; otherwise, it runs for each version of NodeJS, which is not what we want.
- Loading branch information
Showing
1 changed file
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,45 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "0.8" | ||
- "0.10" | ||
- "0.12" | ||
- "iojs-v1" | ||
- "iojs-v2" | ||
- "iojs-v3" | ||
- "4.2" | ||
- "5.5" | ||
- "6.12" | ||
- "8.9" | ||
- "9.11" | ||
- "10.10" | ||
- "11.1" | ||
- "node" | ||
- "0.8" | ||
- "0.10" | ||
- "0.12" | ||
- "iojs-v1" | ||
- "iojs-v2" | ||
- "iojs-v3" | ||
- "4.2" | ||
- "5.5" | ||
- "6.12" | ||
- "8.9" | ||
- "9.11" | ||
- "10.10" | ||
- "11.1" | ||
- "node" | ||
|
||
sudo: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- rabbitmq-server | ||
- rabbitmq-server | ||
|
||
before_install: | ||
- node --version | (grep -v 'v5' && npm install -g npm@2) || true | ||
|
||
sudo: false | ||
|
||
before_deploy: | ||
- sudo apt-get install -y jq | ||
- test "$TRAVIS_TAG" == "v$(jq -r .version < package.json)" | ||
- node --version | (grep -v 'v5' && npm install -g npm@2) || true | ||
|
||
deploy: | ||
on: | ||
tag: true | ||
condition: $TRAVIS_TAG =~ ^v[0-9]+.[0-9]+.[0-9]+$ | ||
provider: npm | ||
script: npm publish --dry-run | ||
# This makes a deploy stage that will run *after* the whole matrix of | ||
# builds above has completed successfully. | ||
jobs: | ||
include: | ||
- stage: deploy | ||
node_js: '11.1' | ||
script: skip | ||
before_deploy: | ||
- sudo apt-get install -y jq | ||
- test "$TRAVIS_TAG" == "v$(jq -r .version < package.json)" | ||
deploy: | ||
provider: npm | ||
email: "$NPM_USER" | ||
api_key: "$NPM_TOKEN" | ||
on: | ||
branch: master | ||
tag: true | ||
condition: $TRAVIS_TAG =~ ^v[0-9]+.[0-9]+.[0-9]+$ |