mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-10 07:29:25 +00:00
split macos and build natively
This commit is contained in:
@@ -121,7 +121,7 @@ jobs:
|
|||||||
name: showbridge-windows
|
name: showbridge-windows
|
||||||
path: |
|
path: |
|
||||||
showbridge_*.zip
|
showbridge_*.zip
|
||||||
macos:
|
macos_arm64:
|
||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
needs: setup_release
|
needs: setup_release
|
||||||
env:
|
env:
|
||||||
@@ -140,11 +140,7 @@ jobs:
|
|||||||
uses: mlugg/setup-zig@v2
|
uses: mlugg/setup-zig@v2
|
||||||
with:
|
with:
|
||||||
version: 0.16.0
|
version: 0.16.0
|
||||||
- name: build amd64
|
- name: build
|
||||||
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
|
|
||||||
run: |
|
run: |
|
||||||
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o showbridge -ldflags="-s -w -X main.version=${SHOWBRIDGE_VERSION}-${SHORT_COMMIT}" ./cmd/showbridge
|
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
|
tar -czf showbridge_${SHOWBRIDGE_VERSION}_macOS-arm64.tar.gz showbridge
|
||||||
@@ -152,7 +148,37 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'workflow_dispatch'
|
||||||
with:
|
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: |
|
path: |
|
||||||
showbridge_*.tar.gz
|
showbridge_*.tar.gz
|
||||||
docker:
|
docker:
|
||||||
|
|||||||
Reference in New Issue
Block a user