-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
66 lines (60 loc) · 2.53 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
65
66
box: simonmenke/go-build:latest
build:
steps:
- setup-go-workspace
- script:
name: "go install"
code: |
CGO_ENABLED=0 go install -v ./cmd/...
- script:
name: "go test"
code: |
go test -v ./pkg/...
- script:
name: "go build"
code: |
cp -r dist/* ${WERCKER_OUTPUT_DIR}/
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/x-heroku-linux-amd64/x-heroku ./cmd/x-heroku
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/x-heroku-darwin-amd64/x-heroku ./cmd/x-heroku
prerelease:
steps:
- script:
name: "Pull secrets"
code: |
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x
eval "$(install-creds)"
- script:
name: "Push release"
code: |
mkdir -p dist
VERSION="$(v5n store bump x-heroku rc)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-heroku-linux-amd64/x-heroku "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-heroku-darwin-amd64/x-heroku "$VERSION"
x-tar build -t Tarfile.linux-amd64 | gzip > dist/x-heroku-linux-amd64.tar.gz
x-tar build -t Tarfile.darwin-amd64 | gzip > dist/x-heroku-darwin-amd64.tar.gz
ghr -u fd -r heroku-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from x-heroku
stable:
steps:
- script:
name: "Pull secrets"
code: |
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x
eval "$(install-creds)"
- script:
name: "Push release"
code: |
mkdir -p dist
VERSION="$(v5n store bump x-heroku final+patch)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-heroku-linux-amd64/x-heroku "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-heroku-darwin-amd64/x-heroku "$VERSION"
x-tar build -t Tarfile.linux-amd64 | gzip > dist/x-heroku-linux-amd64.tar.gz
x-tar build -t Tarfile.darwin-amd64 | gzip > dist/x-heroku-darwin-amd64.tar.gz
ghr -u fd -r heroku-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from x-heroku