Skip to content

Commit

Permalink
chore: update release workflow (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
muktihari authored Aug 29, 2024
1 parent 23116cc commit ee7c952
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit ee7c952

Please sign in to comment.