split macos and build natively

This commit is contained in:
Joel Wetzell
2026-05-17 12:53:05 -05:00
parent 6a324a41b5
commit b31442b794
+33 -7
View File
@@ -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: