From 4b9a11218468fe1db667ac11cf1bd64b10e53b8a Mon Sep 17 00:00:00 2001 From: gregandcin Date: Sun, 7 Apr 2024 16:03:19 -0400 Subject: [PATCH] Add Mac ARM build --- .github/workflows/on-release.yml | 33 ++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index a8c2309..7b144ae 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -30,7 +30,7 @@ jobs: token: ${{secrets.GITHUB_TOKEN}} path: "bin/Pinecone_linux.zip" - publish-binaries-mac: + publish-binaries-mac-intel: timeout-minutes: 20 runs-on: macos-latest @@ -44,16 +44,41 @@ jobs: go-version: "^1.21.5" - name: Build - run: go build -o Pinecone.app + run: GOOS=darwin GOARCH=amd64 go build -o Pinecone.app - name: Zip App - run: mkdir bin && mv Pinecone.app bin/Pinecone.app && mv data bin/data && zip -vr Pinecone_macos.zip bin -x "*.DS_Store" && mv Pinecone_macos.zip bin/ + run: mkdir bin && mv Pinecone.app bin/Pinecone.app && mv data bin/data && zip -vr Pinecone_macos_intel.zip bin -x "*.DS_Store" && mv Pinecone_macos_intel.zip bin/ - name: Upload MacOS Bin uses: djn24/add-asset-to-release@v2 with: token: ${{secrets.GITHUB_TOKEN}} - path: "bin/Pinecone_macos.zip" + path: "bin/Pinecone_macos_intel.zip" + + publish-binaries-mac-arm: + timeout-minutes: 20 + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "^1.21.5" + + - name: Build + run: GOOS=darwin GOARCH=arm64 go build -o Pinecone.app + + - name: Zip App + run: mkdir bin && mv Pinecone.app bin/Pinecone.app && mv data bin/data && zip -vr Pinecone_macos_arm.zip bin -x "*.DS_Store" && mv Pinecone_macos_arm.zip bin/ + + - name: Upload MacOS Bin + uses: djn24/add-asset-to-release@v2 + with: + token: ${{secrets.GITHUB_TOKEN}} + path: "bin/Pinecone_macos_arm.zip" publish-binaries-win: timeout-minutes: 20