Skip to content

Commit

Permalink
Apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-antoniak committed Aug 23, 2024
1 parent bfa93c3 commit 0ec8cca
Showing 1 changed file with 32 additions and 57 deletions.
89 changes: 32 additions & 57 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,70 +11,45 @@ jobs:
name: Build and Upload Release Assets
runs-on: ubuntu-latest
container: golang:1.18-bullseye
strategy:
matrix:
goosarch:
- "linux/amd64"
- "linux/arm64"
- "windows/amd64"
- "darwin/amd64"
- "darwin/arm64"
env:
GO111MODULE: on
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Linux/amd64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
go build -o cql-proxy
tar cvfz cql-proxy-linux-amd64-${{ github.ref_name }}.tgz cql-proxy LICENSE
- name: Build Windows/amd64 binary
- name: Build ${{ matrix.goosarch }} binary
run: |
apt update
apt -y install zip
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=windows
export GOARCH=amd64
go build -o cql-proxy.exe
zip -vr cql-proxy-windows-amd64-${{ github.ref_name }}.zip cql-proxy.exe LICENSE
- name: Build Darwin/amd64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=darwin
export GOARCH=amd64
go build -o cql-proxy
tar cvfz cql-proxy-darwin-amd64-${{ github.ref_name }}.tgz cql-proxy LICENSE
- name: Build Darwin/arm64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=darwin
export GOARCH=arm64
go build -o cql-proxy
tar cvfz cql-proxy-darwin-arm64-${{ github.ref_name }}.tgz cql-proxy LICENSE
- name: Build Linux/arm64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=arm64
go build -o cql-proxy
tar cvfz cql-proxy-linux-arm64-${{ github.ref_name }}.tgz cql-proxy LICENSE
- name: Generate Checksums
run: |
sha256sum cql-proxy-linux-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > cql-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt
sha256sum cql-proxy-windows-amd64-${{ github.ref_name }}.zip | cut -d ' ' -f 1 > cql-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt
sha256sum cql-proxy-darwin-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > cql-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt
sha256sum cql-proxy-darwin-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > cql-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt
sha256sum cql-proxy-linux-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > cql-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt
- name: Create Release
export GOOSARCH=${{ matrix.goosarch }}
export GOOS=${GOOSARCH%/*}
export GOARCH=${GOOSARCH#*/}
mkdir -p artifacts
if [ "$GOOS" = "windows" ]; then
go build -o cql-proxy.exe
zip -vr cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}.zip cql-proxy.exe LICENSE
sha256sum cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}.zip | cut -d ' ' -f 1 > cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}-sha256.txt
else
go build -o cql-proxy
tar cvfz cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}.tgz cql-proxy LICENSE
sha256sum cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > cql-proxy-${GOOS}-${GOARCH}-${{ github.ref_name }}-sha256.txt
fi
mv cql-proxy-* artifacts
- name: Upload ${{ matrix.goosarch }} binaries
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
files: |
cql-proxy-linux-amd64-${{ github.ref_name }}.tgz
cql-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt
cql-proxy-windows-amd64-${{ github.ref_name }}.zip
cql-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt
cql-proxy-darwin-amd64-${{ github.ref_name }}.tgz
cql-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt
cql-proxy-darwin-arm64-${{ github.ref_name }}.tgz
cql-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt
cql-proxy-linux-arm64-${{ github.ref_name }}.tgz
cql-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt
artifacts/*

0 comments on commit 0ec8cca

Please sign in to comment.