2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-13 01:10:49 +00:00
thumbsup/.travis.yml
Romain 4c64251bf5 fix(build): Revert 3ec009e6 + Travis deployment condition + extract Travis script
Travis deploy steps have to be a script file (not a list of steps).

Revert 3ec009e6 because “npm install git+file” actually reads from the local master branch, which
- doesn’t work on Travis since Travis checks out a detached head
- doesn’t work as expected locally, since you might have local changes or might be working from a different branch

For the time being it’s easier to simplify the Docker script and release a known published version.
2018-07-25 22:35:02 +02:00

37 lines
846 B
YAML

# Build steps need access to the Docker agent
sudo: required
services:
- docker
jobs:
include:
# Run all the tests inside Docker
- stage: Test
script: docker build -f Dockerfile.test .
# If this is a tagged commit, publish the package to npm
- stage: Release npm
script: echo "Deploying to npm"
deploy:
provider: npm
email: asyncadventures@gmail.com
api_key: $NPM_TOKEN
on:
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+
# If this is a tagged commit, publish a new Docker image
- stage: Release Docker
script: echo "Deploying to DockerHub"
deploy:
provider: script
script: scripts/travis-release-docker
on:
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+