-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed wercker.yml for creating github release and binary.
- Loading branch information
1 parent
79d4062
commit 9b2740a
Showing
1 changed file
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,53 @@ | ||
box: wercker/golang | ||
# Build definition | ||
box: monochromegane/golang-xc | ||
build: | ||
# The steps that will be executed on build | ||
steps: | ||
# Sets the go workspace and places you package | ||
# at the right place in the workspace tree | ||
- setup-go-workspace | ||
|
||
# Gets the dependencies | ||
- script: | ||
name: go get | ||
code: | | ||
cd $WERCKER_SOURCE_DIR | ||
go version | ||
go get -t ./... | ||
# Build the project | ||
godep restore ./... | ||
- script: | ||
name: go build | ||
name: go test | ||
code: | | ||
go build ./... | ||
# Test the project | ||
godep go test ./... | ||
- script: | ||
name: go test | ||
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*' | ||
- 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: | | ||
go test ./... | ||
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/hoi_linux_386.tar.gz | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_linux_amd64.tar.gz | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_linux_arm.tar.gz | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_darwin_386.zip | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_darwin_amd64.zip | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_windows_386.zip | ||
- wercker/github-upload-asset: | ||
token: $GITHUB_TOKEN | ||
file: snapshot/hoi_windows_amd64.zip |