From 201abf0bc6f1978f3a85105c7f7ce740008dd7a8 Mon Sep 17 00:00:00 2001 From: Kylart Date: Fri, 14 Jun 2019 14:19:19 +0200 Subject: [PATCH] Added conditional deploy steps --- .travis.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index e279beb..620eb24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,9 +19,15 @@ jobs: - ELECTRON_CACHE=$HOME/.cache/electron - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7" - name: Lint + name: Mac script: - npm run lint + deploy: + script: + - npm run publish:mac + on: + branch: master + condition: $TRAVIS_BRANCH = master - os: linux @@ -33,17 +39,12 @@ jobs: - g++-5 - gcc-5 env: CC=gcc-5 CXX=g++-5 - name: Lint + name: Linux script: - npm run lint - - - - name: Deploy - if: branch = master - script: - - | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - npm run publish:linux - else - npm run publish:mac - fi \ No newline at end of file + deploy: + script: + - npm run publish:linux + on: + branch: master + condition: $TRAVIS_BRANCH = master \ No newline at end of file