Skip to content

Commit

Permalink
use circle contexts for publishing to github, packagecloud
Browse files Browse the repository at this point in the history
  • Loading branch information
nickatsegment committed May 30, 2019
1 parent 07d3d8e commit 09d6f0b
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
root: .
paths: ['dist/*']

publish:
publish-packagecloud:
docker:
- image: circleci/golang:1.11
working_directory: /go/src/github.com/segmentio/chamber
Expand All @@ -73,7 +73,6 @@ jobs:
- run:
name: Install tools
command: |
make -f Makefile.tools github-release
# this is all for package_cloud :/
sudo apt update -q
sudo apt install -yq ruby ruby-dev build-essential
Expand All @@ -83,7 +82,23 @@ jobs:
- run:
name: Release
command: |
make -f Makefile.release publish
make -f Makefile.release publish-packagecloud
publish-github:
docker:
- image: circleci/golang:1.11
working_directory: /go/src/github.com/segmentio/chamber
steps:
- checkout
- attach_workspace: { at: . }
- run:
name: Install tools
command: |
make -f Makefile.tools github-release
- run:
name: Release
command: |
make -f Makefile.release publish-github
workflows:
version: 2
Expand All @@ -98,7 +113,19 @@ workflows:
filters:
tags:
only: /.*/
- publish:
- publish-packagecloud:
context: packagecloud
requires:
- dist
filters:
# never publish from a branch event
branches:
ignore: /.*/
# release only on tag push events like vX[.Y.Z...][-whatever]
tags:
only: /v[0-9]+(\.[0-9]+)*(-[a-zA-Z0-9-]+)?/
- publish-github:
context: github-segmentcircle-oss-release
requires:
- dist
filters:
Expand Down

0 comments on commit 09d6f0b

Please sign in to comment.