From f221cf9f8a8f4fb343edb1de94021d29c1620ce2 Mon Sep 17 00:00:00 2001 From: Jeff Klukas Date: Fri, 29 Jun 2018 11:43:16 -0400 Subject: [PATCH] Move CI publish to a separate job --- .circleci/config.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d4e1aa0..0b76194 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ version: 2 jobs: - build: + test: docker: - image: mozilla/sbt:8u171_0.13.13 steps: @@ -21,13 +21,12 @@ jobs: name: Submit coverage data command: | bash <(curl -s https://codecov.io/bash) - - run: - name: Early return if this build is from a forked PR - command: | - if [ -n "$CIRCLE_PR_NUMBER" ] || [ "$CIRCLE_BRANCH" != "master" ]; then - echo "Stopping here; we only publish for pushes to the master branch" - circleci step halt - fi + + publish: + docker: + - image: mozilla/sbt:8u171_0.13.13 + steps: + - checkout - run: name: Publish command: | @@ -35,6 +34,13 @@ jobs: workflows: version: 2 - build: + test-publish: jobs: - - build + - test + # Only publish if tests pass and this is a commit to master + - publish: + requires: + - test + filters: + branches: + only: master