-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from recruit-tech/wercker-deploy
wercker: add cross compile step
- Loading branch information
Showing
1 changed file
with
38 additions
and
1 deletion.
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,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 |