Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

ci: only build releases on tags #72

Merged
merged 11 commits into from
Jun 18, 2019
68 changes: 50 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
version: 2
jobs:
build-linux-go-1.12:
working_directory: ~/go-ethereum
docker:
- image: circleci/golang:1.12
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run:
name: Compile Binaries
command: make build
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
tests-linux-go-1.12:
working_directory: ~/go-ethereum
docker:
- image: circleci/golang:1.12
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run:
name: Run All Tests
command: make test
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
release-linux-go-1.12:
working_directory: ~/go-ethereum
docker:
- image: circleci/golang:1.12
Expand Down Expand Up @@ -38,26 +70,26 @@ jobs:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
tests-linux-go-1.12:
working_directory: ~/go-ethereum
docker:
- image: circleci/golang:1.12
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run:
name: Run All Tests
command: make test
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"

workflows:
version: 2
release:
jobs:
- tests-linux-go-1.12
- build-linux-go-1.12
- build-linux-go-1.12:
filters:
tags:
only: /.*/
- tests-linux-go-1.12:
requires:
- build-linux-go-1.12
filters:
tags:
only: /.*/
- release-linux-go-1.12:
requires:
- tests-linux-go-1.12
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/