Skip to content

Commit

Permalink
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
squaremo committed Jul 27, 2019
1 parent 58ad7db commit fc6e749
Showing 1 changed file with 36 additions and 29 deletions.
65 changes: 36 additions & 29 deletions .travis.yml
@@ -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]+$

0 comments on commit fc6e749

Please sign in to comment.