From 603f46bc59c236c5ab6e2ae76c87ddd58f57ec1d Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 15 Dec 2018 15:27:02 -0500 Subject: [PATCH] updated config.yml --- .circleci/config.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index edf63ab..7146138 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,25 +11,30 @@ jobs: - checkout - run: go get -v -t -d ./... - run: go test -v ./... + deploy: docker: - image: circleci/golang:1.9 working_directory: /go/src/github.com/TanklesXL/FragCollector steps: - checkout - - go get -v -t -d ./... + - add_ssh_keys + - run: go get -u github.com/inconshreveable/mousetrap + - run: go get -u github.com/mitchellh/gox + - run: go get -u github.com/tcnksm/ghr + - run: go get -u github.com/stevenmatthewt/semantics + - run: go get -v -t -d ./... - run: - name:cross compile + name: cross compile command: | gox -os="linux darwin windows" -arch="amd64" -output="dist/FragCollector_{{.OS}}_{{.Arch}}" cd dist/ && gzip * - - add_ssh_keys - run: - name:create release + name: create release command: | tag=$(semantics --output-tag) if ["$tag"]; then - ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $tag dist/ + ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $tag dist/ else echo "The commit message(s) did not indicate a major/minor/patch version." fi @@ -37,11 +42,10 @@ workflows: version: 2 build-deploy: jobs: - -build - -deploy: - requires: - -build - filters: - branches: - only: master - + - build + - deploy: + requires: + - build + filters: + branches: + only: master