Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update release workflow #376

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
- name: Build [macOS]
if: matrix.os == 'macOS'
run: |
CGO=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
zip -q $cli-$os-amd64.zip $cli
CGO=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
zip -q $cli-$os-arm64.zip $cli
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
zip -9q $cli-$os-amd64.zip $cli
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
zip -9q $cli-$os-arm64.zip $cli
rm $cli
printf "sha256: %s\n" "$(shasum -a 256 $cli-$os-amd64.zip)"
printf "sha256: %s\n" "$(shasum -a 256 $cli-$os-arm64.zip)"
Expand All @@ -44,8 +44,8 @@ jobs:
- name: Build [windows]
if: matrix.os == 'windows'
run: |
CGO=0 GOOS=$os GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli.exe cmd/$cli/main.go
zip -q $cli-$os-amd64.zip $cli.exe
CGO_ENABLED=0 GOOS=$os GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli.exe cmd/$cli/main.go
zip -9q $cli-$os-amd64.zip $cli.exe
rm $cli.exe
printf "sha256: %s\n" "$(shasum -a 256 $cli-$os-amd64.zip)"
env:
Expand All @@ -55,8 +55,8 @@ jobs:
- name: Build [linux]
if: matrix.os == 'linux'
run: |
CGO=0 GOOS=$os GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
tar -czf $cli-$os-amd64.tar.gz $cli
CGO_ENABLED=0 GOOS=$os GOARCH=amd64 go build -ldflags="-s -w -X 'main.version=$(git describe --tags)'" -trimpath -o $cli cmd/$cli/main.go
tar -I 'gzip -9' -cf $cli-$os-amd64.tar.gz $cli
rm $cli
printf "sha256: %s\n" "$(shasum -a 256 $cli-$os-amd64.tar.gz)"
env:
Expand Down