Skip to content

Commit 6240d21

Browse files
committed
Fix release workflow: cross-compile darwin/amd64 on arm64 runner
macos-13 runners are retired. Use macos-latest (arm64) for both darwin builds, with clang -arch x86_64 to cross-compile the amd64 variant. https://claude.ai/code/session_01688MBwKW1GJtJKoiYvMxke
1 parent e1cd7ed commit 6240d21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- os: macos-latest
2323
goos: darwin
2424
goarch: arm64
25-
- os: macos-13
25+
- os: macos-latest
2626
goos: darwin
2727
goarch: amd64
2828

@@ -43,6 +43,7 @@ jobs:
4343
GOOS: ${{ matrix.goos }}
4444
GOARCH: ${{ matrix.goarch }}
4545
CGO_ENABLED: '1'
46+
CC: ${{ matrix.goarch == 'amd64' && matrix.goos == 'darwin' && 'clang -arch x86_64' || '' }}
4647
run: go build -ldflags="-s -w" -o microchat-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/server/
4748

4849
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)