Skip to content

Commit

Permalink
Merge pull request #53 from recruit-tech/wercker-deploy
Browse files Browse the repository at this point in the history
wercker: add cross compile step
  • Loading branch information
takahi-i committed Oct 29, 2014
2 parents 5eff5f0 + 82c3308 commit 815fe93
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion wercker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,44 @@
box: wercker/golang@1.2.0
box: motemen/golang[email protected].0
build:
steps:
- script:
name: run test.sh
code: |-
sh ./test.sh
- script:
name: build binary
code: |
. ./build
goxc -tasks='xc archive' -n walter -bc='linux,!arm windows darwin' -main-dirs-exclude='gopath,Godeps,tests' -d ${WERCKER_OUTPUT_DIR}
- script:
name: output release tag
code: |
git describe --tags --exact --match 'v*' > $WERCKER_OUTPUT_DIR/.release_tag || true
deploy:
steps:
# reference: https://github.com/motemen/ghq/blob/beee539aead9c3940a0c4706357c5753999f6c85/wercker.yml
- 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/walter_linux_386.tar.gz
- wercker/github-upload-asset:
token: $GITHUB_TOKEN
file: snapshot/walter_linux_amd64.tar.gz
- wercker/github-upload-asset:
token: $GITHUB_TOKEN
file: snapshot/walter_darwin_386.zip
- wercker/github-upload-asset:
token: $GITHUB_TOKEN
file: snapshot/walter_darwin_amd64.zip
- wercker/github-upload-asset:
token: $GITHUB_TOKEN
file: snapshot/walter_windows_386.zip
- wercker/github-upload-asset:
token: $GITHUB_TOKEN
file: snapshot/walter_windows_amd64.zip

0 comments on commit 815fe93

Please sign in to comment.