Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Move CI publish to a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
jklukas committed Jun 29, 2018
1 parent f16066b commit f221cf9
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

version: 2
jobs:
build:
test:
docker:
- image: mozilla/sbt:8u171_0.13.13
steps:
Expand All @@ -21,20 +21,26 @@ 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: |
sbt publish spPublish
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

0 comments on commit f221cf9

Please sign in to comment.