-
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
36 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,36 @@ | ||
version: | ||
test -n "$(VERSION)" # $$VERSION must be set. | ||
|
||
github-token: | ||
test -n "$(GITHUB_TOKEN)" # $$GITHUB_TOKEN must be set. | ||
|
||
fetch: | ||
go get \ | ||
github.com/mitchellh/gox \ | ||
github.com/aktau/github-release | ||
|
||
clean: | ||
rm -rf ./release | ||
|
||
build: version | ||
gox -verbose \ | ||
-osarch="windows/amd64 linux/amd64 darwin/amd64" \ | ||
-output="release/{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}" . | ||
|
||
test: | ||
go clean -testcache | ||
go test ./... | ||
|
||
publish: version github-token clean test build | ||
github-release release --user yamaszone --repo gcp-secret-manager-buddy --tag ${VERSION} \ | ||
--name "${VERSION}" --description "${VERSION}" && \ | ||
github-release upload --user yamaszone --repo gcp-secret-manager-buddy --tag ${VERSION} \ | ||
--name "gcp-secret-manager-buddy-${VERSION}-windows-amd64.exe" --file release/gcp-secret-manager-buddy-${VERSION}-windows-amd64.exe; \ | ||
github-release upload --user yamaszone --repo gcp-secret-manager-buddy --tag ${VERSION} \ | ||
--name "gcp-secret-manager-buddy-${VERSION}-windows-amd64.exe.asc" --file release/gcp-secret-manager-buddy-${VERSION}-windows-amd64.exe.asc; \ | ||
for qualifier in darwin-amd64 linux-amd64 ; do \ | ||
github-release upload --user yamaszone --repo gcp-secret-manager-buddy --tag ${VERSION} \ | ||
--name "gcp-secret-manager-buddy-${VERSION}-$$qualifier" --file release/gcp-secret-manager-buddy-${VERSION}-$$qualifier; \ | ||
github-release upload --user yamaszone --repo gcp-secret-manager-buddy --tag ${VERSION} \ | ||
--name "gcp-secret-manager-buddy-${VERSION}-$$qualifier.asc" --file release/gcp-secret-manager-buddy-${VERSION}-$$qualifier.asc; \ | ||
done |