From 1f4292683efbe9e1771a19c9e3bc28f8e052c795 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Sat, 24 Nov 2018 20:01:11 +0000 Subject: [PATCH] releasing --- .circleci/config.yml | 11 ++++++----- Makefile | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61d7801..392c90a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: - checkout - run: make build-linux - persist_to_workspace: - root: . + root: release paths: - bin/linux build-darwin: @@ -32,21 +32,22 @@ jobs: - checkout - run: make build-darwin - persist_to_workspace: - root: . + root: release paths: - bin/darwin release: docker: - image: circleci/golang:latest steps: - - run: mkdir -p bin + - run: mkdir -p release/bin/darwin + - run: mkdir -p release/bin/linux - attach_workspace: - at: bin + at: release - run: name: "Publish Release on GitHub" command: | go get github.com/tcnksm/ghr - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} bin/ + ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} release/bin/ workflows: version: 2 build: diff --git a/Makefile b/Makefile index 9783148..9cf65f6 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,10 @@ update-fonts: install-tools .PHONY: build-linux build-linux: - mkdir -p bin/linux + mkdir -p release/bin/linux GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o bin/${BINARY}-linux-amd64 -ldflags "-X main.Version=`${CIRCLE_TAG}`" .PHONY: build-darwin build-darwin: - mkdir -p bin/darwin + mkdir -p release/bin/darwin xgo -ldflags "-X main.Version=`${CIRCLE_TAG}`" --targets=darwin/amd64 --dest=bin/darwin -out ${BINARY}-darwin-amd64 .