Skip to content

Commit b106720

Browse files
timiclaude
authored andcommitted
fix: properly exclude cli-bundle/node from re-signing to fix runtime
- Remove cli-bundle/node from fallback signing loop - Remove --deep signing which re-signs all nested binaries - Re-apply ad-hoc signing to cli-bundle/node after main signing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0956ffb commit b106720

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,10 @@ jobs:
212212
find "$APP_BUNDLE" -type f -name "*.dylib" -print0 | xargs -0 codesign --force --sign "$SIGN_ID" --options runtime --timestamp || true
213213
214214
# Sign specific problematic executables with Developer ID, timestamp, and hardened runtime
215+
# Skip cli-bundle/* as they are already signed by bundle-runtime.sh
215216
echo " Signing specific executables..."
216217
for exe in \
217-
"$APP_BUNDLE/Contents/Resources/_up_/cli-bundle/node" \
218218
"$APP_BUNDLE/Contents/Resources/_up_/cli-bundle/vendor/ripgrep/arm64-darwin/rg" \
219-
"$APP_BUNDLE/Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/node" \
220219
"$APP_BUNDLE/Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/vendor/ripgrep/arm64-darwin/rg"
221220
do
222221
if [ -f "$exe" ]; then
@@ -229,7 +228,6 @@ jobs:
229228
# Verify signatures
230229
echo " Verifying signatures..."
231230
for file in \
232-
"$APP_BUNDLE/Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/node" \
233231
"$APP_BUNDLE/Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/vendor/ripgrep/arm64-darwin/rg"
234232
do
235233
if [ -f "$file" ]; then
@@ -240,15 +238,18 @@ jobs:
240238
241239
echo "✅ Fallback signing complete"
242240
243-
- name: Sign app bundle with Developer ID (deep)
241+
- name: Sign app bundle with Developer ID
244242
env:
245243
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
246244
run: |
247245
APP_BUNDLE="./lumis/apps/web/src-tauri/target/release/bundle/macos/Lumis.app"
248-
echo "Deep signing app bundle: $APP_BUNDLE"
249-
# Use --deep to recursively sign all nested binaries
250-
codesign --deep --force --sign "$APPLE_SIGNING_IDENTITY" --options runtime --timestamp "$APP_BUNDLE"
251-
echo "✅ App bundle deep signed"
246+
echo "Signing app bundle: $APP_BUNDLE"
247+
# Sign the main app bundle (but not recursively to avoid re-signing cli-bundle/node)
248+
codesign --force --sign "$APPLE_SIGNING_IDENTITY" --options runtime --timestamp "$APP_BUNDLE"
249+
# Re-apply ad-hoc signing to cli-bundle/node after main signing
250+
# because it must keep its original signature to run properly
251+
codesign --force --sign - --options runtime "$APP_BUNDLE/Contents/Resources/_up_/cli-bundle/node"
252+
echo "✅ App bundle signed"
252253
253254
- name: Create DMG manually from signed app bundle
254255
run: |

0 commit comments

Comments
 (0)