From 756b7941af9523388d709e206f17e39bdf4e0bb7 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 8 May 2018 23:37:54 -0400 Subject: [PATCH] Make release stage conditional by branch If the branch isn't a release branch, don't even try to do the release stage. This should speed up PR tests. --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 364d2f03a..0ce8cba11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,15 +29,13 @@ jobs: - git config --global user.name $(git log --pretty=format:"%an" -n1) deploy: - provider: npm - "on": - all_branches: true - condition: $RELEASE_BRANCHES =~ $TRAVIS_BRANCH skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN - provider: script - "on": - all_branches: true - condition: $RELEASE_BRANCHES =~ $TRAVIS_BRANCH skip_cleanup: true script: npm run --silent deploy -- -x -r $GH_PAGES_REPO +stages: +- test +- name: release + if: branch in (master, develop)