-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
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 |
---|---|---|
@@ -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 |