Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (72 sloc) 1.99 KB
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.11.1
steps:
- checkout
- run: make test
- run: make
build-release:
docker:
- image: circleci/golang:1.11.1
steps:
- checkout
- run: VERSION="${CIRCLE_TAG}" make dist dev
- save_cache:
key: dist-{{ .Revision }}
paths:
- dist/
upload-release:
docker:
- image: circleci/golang:1.11.1
steps:
- checkout
- restore_cache:
keys:
- dist-{{ .Revision }}
- run: |
go get -u github.com/tombell/brewer/cmd/brewer
- run: |
dist/releasekit -t ${GITHUB_TOKEN} \
-o tombell \
-r releasekit \
-p $(git tag | sort -V | tail -2 | head -1) \
-n ${CIRCLE_TAG} \
--attachment dist/releasekit-linux-amd64 \
--attachment dist/releasekit-darwin-amd64 \
--attachment dist/releasekit-windows-amd64
- run: |
brewer --token ${GITHUB_TOKEN} \
--owner tombell \
--name homebrew-formulae \
--formula Formula/releasekit.rb \
--tag ${CIRCLE_TAG} \
--revision ${CIRCLE_SHA1} \
--commit-message "Update Formula/releasekit.rb to ${CIRCLE_TAG}" \
--commit-author "Tom Bell" \
--commit-email "tomb@tomb.io"
workflows:
version: 2
build-n-upload:
jobs:
- build:
filters:
branches:
only: /.*/
tags:
ignore: /.*/
- build-release:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
- upload-release:
requires:
- build-release
filters:
branches:
ignore: /.*/
tags:
only: /.*/