2525
2626jobs :
2727 preflight_macos_release :
28- runs-on : macos-latest
28+ # Use GitHub's xlarge macOS runner because release packaging is
29+ # Swift-heavy and benefits from the faster hosted hardware tier.
30+ runs-on : macos-latest-xlarge
2931 permissions :
3032 contents : read
3133 steps :
5961 xcodebuild -version
6062 swift --version
6163
64+ - name : Cache SwiftPM
65+ uses : actions/cache@v5
66+ with :
67+ path : ~/Library/Caches/org.swift.swiftpm
68+ key : ${{ runner.os }}-swiftpm-release-${{ hashFiles('apps/macos/Package.resolved') }}
69+ restore-keys : |
70+ ${{ runner.os }}-swiftpm-release-
71+
6272 - name : Ensure matching GitHub release exists
6373 env :
6474 GH_TOKEN : ${{ github.token }}
@@ -94,18 +104,6 @@ jobs:
94104 NODE_OPTIONS : --max-old-space-size=4096
95105 run : pnpm release:check
96106
97- - name : Swift build
98- run : |
99- set -euo pipefail
100- for attempt in 1 2 3; do
101- if swift build --package-path apps/macos --configuration release; then
102- exit 0
103- fi
104- echo "swift build failed (attempt $attempt/3). Retrying…"
105- sleep $((attempt * 20))
106- done
107- exit 1
108-
109107 - name : Swift test
110108 run : |
111109 set -euo pipefail
@@ -119,18 +117,31 @@ jobs:
119117 exit 1
120118
121119 - name : Package macOS release with ad-hoc signing
120+ id : package_preflight
122121 env :
123- APP_VERSION : ${{ steps.package_version.outputs.value }}
124122 BUNDLE_ID : ai.openclaw.mac
125123 BUILD_CONFIG : release
126124 CODESIGN_TIMESTAMP : " off"
127125 SIGN_IDENTITY : " -"
128- SKIP_NOTARIZE : " 1"
129126 SKIP_PNPM_INSTALL : " 1"
130127 SKIP_TSC : " 1"
131128 SKIP_UI_BUILD : " 1"
132129 SPARKLE_FEED_URL : ${{ env.SPARKLE_FEED_URL }}
133- run : scripts/package-mac-dist.sh
130+ run : |
131+ set -euo pipefail
132+ scripts/package-mac-app.sh
133+ VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" dist/OpenClaw.app/Contents/Info.plist)
134+ ZIP_PATH="dist/OpenClaw-${VERSION}.zip"
135+ rm -f "$ZIP_PATH"
136+ ditto -c -k --sequesterRsrc --keepParent dist/OpenClaw.app "$ZIP_PATH"
137+ echo "zip_path=$ZIP_PATH" >> "$GITHUB_OUTPUT"
138+
139+ - name : Upload preflight macOS artifacts
140+ uses : actions/upload-artifact@v7
141+ with :
142+ name : macos-preflight-${{ inputs.tag }}
143+ path : ${{ steps.package_preflight.outputs.zip_path }}
144+ if-no-files-found : error
134145
135146 validate_publish_dispatch_ref :
136147 if : ${{ !inputs.preflight_only }}
@@ -151,7 +162,7 @@ jobs:
151162 publish_macos_release :
152163 needs : [preflight_macos_release, validate_publish_dispatch_ref]
153164 if : ${{ !inputs.preflight_only }}
154- runs-on : macos-latest
165+ runs-on : macos-latest-xlarge
155166 environment : mac-release
156167 concurrency :
157168 # Stable releases all derive the same shared appcast.xml; serialize those
@@ -191,6 +202,14 @@ jobs:
191202 xcodebuild -version
192203 swift --version
193204
205+ - name : Cache SwiftPM
206+ uses : actions/cache@v5
207+ with :
208+ path : ~/Library/Caches/org.swift.swiftpm
209+ key : ${{ runner.os }}-swiftpm-release-${{ hashFiles('apps/macos/Package.resolved') }}
210+ restore-keys : |
211+ ${{ runner.os }}-swiftpm-release-
212+
194213 - name : Ensure matching GitHub release exists
195214 env :
196215 GH_TOKEN : ${{ github.token }}
0 commit comments