@@ -188,28 +188,61 @@ jobs:
188
188
echo "=== App bundle root after cleanup ==="
189
189
ls -la "ClaudeCodeMonitor.app/"
190
190
191
- # Sign Sparkle.framework first if it exists
191
+ # Sign Sparkle.framework components if it exists
192
192
if [ -d "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework" ]; then
193
- echo "=== Signing Sparkle.framework ==="
194
- codesign --force --strict \
195
- --options runtime \
196
- --sign "$CERT_NAME" \
197
- --timestamp \
193
+ echo "=== Signing Sparkle.framework components ==="
194
+
195
+ # Sign individual binaries first
196
+ if [ -f "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate" ]; then
197
+ echo " Signing Autoupdate binary..."
198
+ codesign --force --options runtime --sign "$CERT_NAME" --timestamp \
199
+ "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate"
200
+ fi
201
+
202
+ if [ -f "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle" ]; then
203
+ echo " Signing Sparkle binary..."
204
+ codesign --force --options runtime --sign "$CERT_NAME" --timestamp \
205
+ "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle"
206
+ fi
207
+
208
+ # Sign Updater.app
209
+ if [ -d "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app" ]; then
210
+ echo " Signing Updater.app..."
211
+ codesign --force --deep --options runtime --sign "$CERT_NAME" --timestamp \
212
+ "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"
213
+ fi
214
+
215
+ # Sign XPCServices
216
+ if [ -d "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices" ]; then
217
+ echo " Signing XPC Services..."
218
+ find "ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices" \
219
+ -name "*.xpc" -exec codesign --force --deep --options runtime --sign "$CERT_NAME" --timestamp {} \;
220
+ fi
221
+
222
+ # Finally sign the framework itself
223
+ echo " Signing Sparkle.framework..."
224
+ codesign --force --options runtime --sign "$CERT_NAME" --timestamp \
198
225
"ClaudeCodeMonitor.app/Contents/Frameworks/Sparkle.framework"
199
226
fi
200
227
201
- # Try signing (without --deep to preserve framework signatures)
202
- echo "=== Attempting to sign app ==="
203
- codesign --force --strict \
228
+ # Sign the app with --deep to ensure all components are signed
229
+ echo "=== Attempting to sign app with --deep ==="
230
+ codesign --force --deep -- strict \
204
231
--options runtime \
205
232
--entitlements ClaudeCodeMonitor.entitlements \
206
233
--sign "$CERT_NAME" \
207
234
--timestamp \
208
235
"ClaudeCodeMonitor.app"
209
236
210
- # Verify signature
211
- codesign --verify --deep --strict --verbose=2 "ClaudeCodeMonitor.app"
237
+ # Verify signature with detailed output
238
+ echo "=== Verifying signature ==="
239
+ codesign --verify --deep --strict --verbose=4 "ClaudeCodeMonitor.app"
240
+
241
+ echo "=== Signature details ==="
212
242
codesign -dvvv "ClaudeCodeMonitor.app"
243
+
244
+ echo "=== Verifying with spctl ==="
245
+ spctl -a -vvv -t install "ClaudeCodeMonitor.app" || echo "Note: spctl check may fail in CI environment"
213
246
214
247
# Ad-hoc sign if no certificates
215
248
- name : Ad-hoc sign app bundle
@@ -278,8 +311,26 @@ jobs:
278
311
if : steps.check_signing.outputs.has_signing_cert == 'true' && steps.check_signing.outputs.has_notarization == 'true'
279
312
run : |
280
313
echo "📎 Stapling notarization..."
281
- xcrun stapler staple "$DMG_PATH"
282
- xcrun stapler validate "$DMG_PATH"
314
+ echo "DMG_PATH: $DMG_PATH"
315
+
316
+ # Check if DMG exists
317
+ if [ ! -f "$DMG_PATH" ]; then
318
+ echo "❌ DMG file not found at: $DMG_PATH"
319
+ ls -la
320
+ exit 1
321
+ fi
322
+
323
+ # Verify DMG signature before stapling
324
+ echo "=== Verifying DMG signature before stapling ==="
325
+ codesign --verify --verbose=2 "$DMG_PATH"
326
+
327
+ # Attempt to staple
328
+ echo "=== Stapling notarization ticket ==="
329
+ xcrun stapler staple -v "$DMG_PATH"
330
+
331
+ # Validate the staple
332
+ echo "=== Validating stapled notarization ==="
333
+ xcrun stapler validate -v "$DMG_PATH"
283
334
284
335
# Generate changelog for development releases
285
336
- name : Generate changelog
0 commit comments