From f19c684f7ff461482a82968888bacfd544a46da8 Mon Sep 17 00:00:00 2001 From: monochromegane Date: Mon, 21 Jul 2014 21:45:12 +0900 Subject: [PATCH] Use wercker.com for saving each version binary. --- wercker.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 wercker.yml diff --git a/wercker.yml b/wercker.yml new file mode 100644 index 0000000..6884f75 --- /dev/null +++ b/wercker.yml @@ -0,0 +1,53 @@ +box: monochromegane/golang-xc +build: + steps: + - setup-go-workspace + - script: + name: go get + code: | + go version + godep restore + - script: + name: go test + code: | + godep go test ./... + - script: + name: goxc build & archive + code: | + GODEPPATH=`godep path` + export GOPATH="$GODEPPATH:$GOPATH" + goxc -tasks='xc archive' -bc 'linux windows darwin' -d $WERCKER_OUTPUT_DIR/ -resources-include='README*' -n pt + - script: + name: output release tag + code: | + git describe --tags --exact --match 'v*' > $WERCKER_OUTPUT_DIR/.release_tag || true +deploy: + steps: + - script: + name: restore release tag + code: | + export RELEASE_TAG=$(cat .release_tag) + - wercker/github-create-release: + token: $GITHUB_TOKEN + tag: $RELEASE_TAG + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_linux_386.tar.gz + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_linux_amd64.tar.gz + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_linux_arm.tar.gz + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_darwin_386.zip + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_darwin_amd64.zip + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_windows_386.zip + - wercker/github-upload-asset: + token: $GITHUB_TOKEN + file: snapshot/pt_windows_amd64.zip