Skip to content

Commit ed23e9d

Browse files
committed
Fix macOS release NativeAOT packaging
1 parent 84460e5 commit ed23e9d

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
os: windows-latest
5050
rid: win-x64
5151
- asset: macos-arm64
52-
os: macos-14
52+
os: macos-15
5353
rid: osx-arm64
5454

5555
steps:
@@ -77,6 +77,7 @@ jobs:
7777
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
7878
run: |
7979
$ErrorActionPreference = "Stop"
80+
$PSNativeCommandUseErrorActionPreference = $true
8081
$rid = "${{ matrix.rid }}"
8182
$root = (Get-Location).Path
8283
$staging = Join-Path $root "artifacts/release/$rid"
@@ -92,6 +93,19 @@ jobs:
9293
$desktopGateway = Join-Path $staging "desktop/gateway"
9394
$desktopCli = Join-Path $staging "desktop/cli"
9495
96+
if ($IsMacOS) {
97+
$developerDir = (& xcode-select -p).Trim()
98+
$sdkPath = (& xcrun --sdk macosx --show-sdk-path).Trim()
99+
$swiftLibraryDirs = @(
100+
"/usr/lib/swift",
101+
(Join-Path $developerDir "Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx"),
102+
(Join-Path $sdkPath "usr/lib/swift")
103+
) | Where-Object { Test-Path $_ }
104+
$existingLibraryPath = if ($env:LIBRARY_PATH) { @($env:LIBRARY_PATH) } else { @() }
105+
$env:LIBRARY_PATH = ($swiftLibraryDirs + $existingLibraryPath) -join [IO.Path]::PathSeparator
106+
Write-Host "Using macOS Swift library paths: $env:LIBRARY_PATH"
107+
}
108+
95109
dotnet publish "$root/src/OpenClaw.Gateway/OpenClaw.Gateway.csproj" -c Release -r $rid -p:PublishAot=true -p:OpenClawEnableMafExperiment=false -o $gatewayStandard
96110
dotnet publish "$root/src/OpenClaw.Gateway/OpenClaw.Gateway.csproj" -c Release -r $rid -p:PublishAot=true -p:OpenClawEnableMafExperiment=true -o $gatewayMaf
97111
dotnet publish "$root/src/OpenClaw.Cli/OpenClaw.Cli.csproj" -c Release -r $rid -p:PublishAot=true -o $cli

docs/RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The workflow currently builds:
6666

6767
- `linux-x64` on `ubuntu-latest`
6868
- `win-x64` on `windows-latest`
69-
- `osx-arm64` on `macos-14`
69+
- `osx-arm64` on `macos-15`
7070

7171
The macOS runner label is intentionally ARM-native for the `osx-arm64` artifact. Add an Intel macOS row only if you want to support older Intel Macs and have a runner that can NativeAOT publish that RID reliably.
7272

0 commit comments

Comments
 (0)