From 2262d5b54114fa4ff9adafd39e3e9d422938cdc8 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 12 Dec 2018 15:15:04 -0500 Subject: [PATCH] updated config for ci, trying to deploy [patch] --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 76e6a16..edf63ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,22 +5,43 @@ version: 2 jobs: build: docker: - # specify the version - image: circleci/golang:1.9 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - #### TEMPLATE_NOTE: go expects specific checkout path representing url - #### expecting it in the form of - #### /go/src/github.com/circleci/go-tool - #### /go/src/bitbucket.org/circleci/go-tool working_directory: /go/src/github.com/TanklesXL/FragCollector steps: - checkout - - # specify any bash command here prefixed with `run: ` - 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 ./... + - run: + 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 + command: | + tag=$(semantics --output-tag) + if ["$tag"]; then + 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 +workflows: + version: 2 + build-deploy: + jobs: + -build + -deploy: + requires: + -build + filters: + branches: + only: master +