From 62a8407ef926e4f5d5865068f5105bb3610375f2 Mon Sep 17 00:00:00 2001 From: weideng1 Date: Wed, 19 Oct 2022 11:16:35 -0600 Subject: [PATCH] Create binaries for darwin-amd64, darwin-arm64, linux-arm64 (#60) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #44 Co-authored-by: João Reis --- .github/workflows/release-binary.yml | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index cd20488b..720ac42b 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -33,10 +33,37 @@ jobs: export GOARCH=amd64 go build -o zdm-proxy-${{ github.ref_name }}.exe ./proxy zip -vr zdm-proxy-windows-amd64-${{ github.ref_name }}.zip zdm-proxy-${{ github.ref_name }}.exe LICENSE + - name: Build Darwin/amd64 binary + run: | + export GO111MODULE=on + export CGO_ENABLED=0 + export GOOS=darwin + export GOARCH=amd64 + go build -o zdm-proxy-${{ github.ref_name }} ./proxy + tar cvfz zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE + - name: Build Darwin/arm64 binary + run: | + export GO111MODULE=on + export CGO_ENABLED=0 + export GOOS=darwin + export GOARCH=arm64 + go build -o zdm-proxy-${{ github.ref_name }} ./proxy + tar cvfz zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE + - name: Build Linux/arm64 binary + run: | + export GO111MODULE=on + export CGO_ENABLED=0 + export GOOS=linux + export GOARCH=arm64 + go build -o zdm-proxy-${{ github.ref_name }} ./proxy + tar cvfz zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE - name: Generate Checksums run: | sha256sum zdm-proxy-linux-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt sha256sum zdm-proxy-windows-amd64-${{ github.ref_name }}.zip | cut -d ' ' -f 1 > zdm-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt + sha256sum zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt + sha256sum zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt + sha256sum zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt - name: Create Release uses: softprops/action-gh-release@v1 with: @@ -45,4 +72,10 @@ jobs: zdm-proxy-linux-amd64-${{ github.ref_name }}.tgz zdm-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt zdm-proxy-windows-amd64-${{ github.ref_name }}.zip - zdm-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt \ No newline at end of file + zdm-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt + zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz + zdm-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt + zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz + zdm-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt + zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz + zdm-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt