From be3a7580b6224d254c9ba7ce7ae563546c40a30c Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Sun, 18 Feb 2018 22:49:36 +1100 Subject: [PATCH] Add deploy step to CircleCI --- .circleci/config.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ef473a..60acf02 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,14 +3,34 @@ # Check https://circleci.com/docs/2.0/language-go/ for more details version: 2 jobs: + build: docker: - image: circleci/golang:1.9 - working_directory: /go/src/github.com/hipages/php-fpm_exporter steps: - checkout - - run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep - run: dep ensure -vendor-only - - run: go test -v ./... \ No newline at end of file + - run: go test -v ./... + + deploy: + docker: + - image: circleci/golang:1.9 + working_directory: /go/src/github.com/hipages/php-fpm_exporter + steps: + - run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep + - run: dep ensure -vendor-only + - run: curl -sL https://git.io/goreleaser | bash + +workflows: + version: 2 + build-n-deploy: + jobs: + - build + - deploy: + requires: + - build + filters: + tags: + only: /v[0-9]+(\.[0-9]+)*(-.*)*/ \ No newline at end of file