Skip to content

Commit

Permalink
Changed wercker.yml for creating github release and binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
monochromegane committed Jul 13, 2014
1 parent 79d4062 commit 9b2740a
Showing 1 changed file with 42 additions and 17 deletions.
59 changes: 42 additions & 17 deletions wercker.yml
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

0 comments on commit 9b2740a

Please sign in to comment.