From c2da1b6c283cd8aa72fef0a77bf09b770c7447ac Mon Sep 17 00:00:00 2001 From: Nick Irvine Date: Thu, 30 May 2019 15:39:12 -0700 Subject: [PATCH] Use circle contexts for github and packagecloud publishing --- .circleci/config.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 710bf56a..d6fc9cb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ jobs: root: . paths: ['dist/*'] - publish-linux: + publish-packagecloud: docker: - image: circleci/golang:1.10 working_directory: /go/src/github.com/segmentio/aws-okta @@ -56,10 +56,19 @@ jobs: # fixes https://askubuntu.com/questions/872399/error-failed-to-build-gem-native-extension-when-trying-to-download-rubocop sudo gem install rake sudo make -f Makefile.tools package_cloud + + publish-github-linux: + docker: + - image: circleci/golang:1.10 + working_directory: /go/src/github.com/segmentio/aws-okta + steps: + - checkout + - attach_workspace: { at: . } - run: - name: Release + name: Install tools command: | - make -f Makefile.release publish-linux + make -f Makefile.tools github-release + make -f Makefile.release publish-github-linux workflows: version: 2 @@ -74,7 +83,19 @@ workflows: filters: tags: only: /.*/ - - publish-linux: + - publish-packagecloud: + context: packagecloud + requires: + - dist-linux + 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-linux: + context: github-segmentcircle-oss-release requires: - dist-linux filters: