Skip to content

Commit

Permalink
Added wercker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fd committed May 13, 2016
1 parent a8bbaf7 commit f427b1c
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions wercker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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 ./cmd/... ./internal/...
- script:
name: "go build"
code: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/x-tar-linux-amd64/x-tar ./cmd/x-tar
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/x-tar-darwin-amd64/x-tar ./cmd/x-tar
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-tar rc)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-tar-linux-amd64/x-tar "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-tar-darwin-amd64/x-tar "$VERSION"
tar -C bin/x-tar-linux-amd64 -f dist/x-tar-linux-amd64.tar.gz -cz .
tar -C bin/x-tar-darwin-amd64 -f dist/x-tar-darwin-amd64.tar.gz -cz .
ghr -u fd -r tar-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from x-tar

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-tar final+patch)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-tar-linux-amd64/x-tar "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/x-tar-darwin-amd64/x-tar "$VERSION"
tar -C bin/x-tar-linux-amd64 -f dist/x-tar-linux-amd64.tar.gz -cz .
tar -C bin/x-tar-darwin-amd64 -f dist/x-tar-darwin-amd64.tar.gz -cz .
ghr -u fd -r tar-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist
- mbrevda/[email protected]:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from x-tar

0 comments on commit f427b1c

Please sign in to comment.