-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathwercker.yml
64 lines (64 loc) · 1.92 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
box: golang
build:
steps:
- setup-go-workspace
- script:
name: install packages
code: |
go get -u -v github.com/laher/goxc
go get -u -v github.com/tools/godep
- script:
name: go get
code: |
go version
godep restore
- script:
name: go test
code: |
godep go test ./...
- script:
name: goxc build & archive
code: |
mkdir Godeps/_workspace
GODEPPATH=`godep path`
export GOPATH="$GODEPPATH:$GOPATH"
goxc -tasks='xc archive' -bc 'linux windows darwin' -d $WERCKER_OUTPUT_DIR/ -resources-include='README*' -main-dirs-exclude='Godeps,lib' -n pt
- script:
name: output release tag
code: |
git describe --tags --exact --match 'v*' > $WERCKER_OUTPUT_DIR/.release_tag || true
deploy:
steps:
- script:
name: install packages
code: |
apt-get update -y
apt-get install -y file
- 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