From b31442b794aacdd3568a86b8c4fc765d955f952b Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Sun, 17 May 2026 12:53:05 -0500 Subject: [PATCH] split macos and build natively --- .github/workflows/release-showbridge.yaml | 40 +++++++++++++++++++---- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-showbridge.yaml b/.github/workflows/release-showbridge.yaml index c97ad50..4a0716a 100644 --- a/.github/workflows/release-showbridge.yaml +++ b/.github/workflows/release-showbridge.yaml @@ -121,7 +121,7 @@ jobs: name: showbridge-windows path: | showbridge_*.zip - macos: + macos_arm64: runs-on: macos-26 needs: setup_release env: @@ -140,11 +140,7 @@ jobs: uses: mlugg/setup-zig@v2 with: version: 0.16.0 - - name: build amd64 - run: | - SDK_PATH=$(xcrun --show-sdk-path) CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC="clang -arch x86_64 -isysroot $SDK_PATH" CXX="clang++ -arch x86_64 -isysroot $SDK_PATH" go build -o showbridge -ldflags="-s -w -X main.version=${SHOWBRIDGE_VERSION}-${SHORT_COMMIT}" ./cmd/showbridge - tar -czf showbridge_${SHOWBRIDGE_VERSION}_macOS-amd64.tar.gz showbridge - - name: build arm64 + - name: build run: | CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o showbridge -ldflags="-s -w -X main.version=${SHOWBRIDGE_VERSION}-${SHORT_COMMIT}" ./cmd/showbridge tar -czf showbridge_${SHOWBRIDGE_VERSION}_macOS-arm64.tar.gz showbridge @@ -152,7 +148,37 @@ jobs: uses: actions/upload-artifact@v7 if: github.event_name == 'workflow_dispatch' with: - name: showbridge-macos + name: showbridge-macos-arm64 + path: | + showbridge_*.tar.gz + macos_amd64: + runs-on: macos-26-intel + needs: setup_release + env: + SHOWBRIDGE_VERSION: ${{ needs.setup_release.outputs.version }} + SHORT_COMMIT: ${{ needs.setup_release.outputs.short_commit }} + steps: + - name: checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: setup go + uses: actions/setup-go@v6 + with: + go-version-file: "go.mod" + - name: setup zig + uses: mlugg/setup-zig@v2 + with: + version: 0.16.0 + - name: build + run: | + CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o showbridge -ldflags="-s -w -X main.version=${SHOWBRIDGE_VERSION}-${SHORT_COMMIT}" ./cmd/showbridge + tar -czf showbridge_${SHOWBRIDGE_VERSION}_macOS-amd64.tar.gz showbridge + - name: upload macos artifacts + uses: actions/upload-artifact@v7 + if: github.event_name == 'workflow_dispatch' + with: + name: showbridge-macos-amd64 path: | showbridge_*.tar.gz docker: