-
Notifications
You must be signed in to change notification settings - Fork 37
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
20 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
--- | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
concurrency: main | ||
name: release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
|
@@ -20,8 +25,20 @@ jobs: | |
uses: jossef/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: build | ||
run: "export CGO_ENABLED=0\necho \"${{ steps.release.outputs.tag_name }}\" | tr -d '\\n' > version \nenv GOOS=android GOARCH=arm64 go build -o bin/runpodctl-android-arm64 .\nenv GOOS=darwin GOARCH=amd64 go build -o bin/runpodctl-darwin-amd64 .\nenv GOOS=darwin GOARCH=arm64 go build -o bin/runpodctl-darwin-arm64 .\nenv GOOS=linux GOARCH=amd64 go build -o bin/runpodctl-linux-amd64 .\nenv GOOS=linux GOARCH=arm64 go build -o bin/runpodctl-linux-arm64 .\nenv GOOS=windows GOARCH=amd64 go build -o bin/runpodctl-windows-amd64.exe .\nstrip bin/* || true # strip the binary's DWARF debug info, where applicable\n./tools/upx --best bin/* || true # compress the binaries\n" | ||
run: | | ||
export CGO_ENABLED=0 | ||
echo "${{ steps.release.outputs.tag_name }}" | tr -d '\n' > version | ||
env GOOS=android GOARCH=arm64 go build -o bin/runpodctl-android-arm64 . | ||
env GOOS=darwin GOARCH=amd64 go build -o bin/runpodctl-darwin-amd64 . | ||
env GOOS=darwin GOARCH=arm64 go build -o bin/runpodctl-darwin-arm64 . | ||
env GOOS=linux GOARCH=amd64 go build -o bin/runpodctl-linux-amd64 . | ||
env GOOS=linux GOARCH=arm64 go build -o bin/runpodctl-linux-arm64 . | ||
env GOOS=windows GOARCH=amd64 go build -o bin/runpodctl-windows-amd64.exe . | ||
strip bin/* || true # strip the binary's DWARF debug info, where applicable | ||
./tools/upx --best bin/* || true # compress the binaries | ||
- name: upload linux amd64 release binary | ||
uses: actions/[email protected] | ||
env: | ||
|
@@ -40,6 +57,7 @@ jobs: | |
asset_path: bin/runpodctl-darwin-amd64 | ||
asset_name: runpodctl-darwin-amd64 | ||
asset_content_type: application/octet-stream | ||
|
||
- name: upload darwin arm64 release binary | ||
uses: actions/[email protected] | ||
env: | ||
|
@@ -49,6 +67,7 @@ jobs: | |
asset_path: bin/runpodctl-darwin-arm64 | ||
asset_name: runpodctl-darwin-arm64 | ||
asset_content_type: application/octet-stream | ||
|
||
- name: upload windows amd64 release binary | ||
uses: actions/[email protected] | ||
env: | ||
|