@@ -236,6 +236,41 @@ jobs:
236236 rm -f "$RW_DMG"
237237 done
238238
239+ - name : Verify DMG contains signed app
240+ if : runner.os == 'macOS'
241+ shell : bash
242+ run : |
243+ set -euo pipefail
244+ DMG_DIR="src-tauri/target/${{ matrix.target }}/release/bundle/dmg"
245+ if [ -d "$DMG_DIR" ]; then
246+ for dmg in "$DMG_DIR"/*.dmg; do
247+ [ -f "$dmg" ] || continue
248+ echo "Verifying app inside: $dmg"
249+ MOUNT=$(hdiutil attach -nobrowse -readonly "$dmg" | awk '/Volumes/ {print $3; exit}')
250+ if [ -z "$MOUNT" ]; then
251+ echo "Failed to mount DMG for verification: $dmg"
252+ exit 1
253+ fi
254+ APP_PATH=$(find "$MOUNT" -maxdepth 2 -name "*.app" -print -quit)
255+ if [ -z "$APP_PATH" ]; then
256+ echo "No .app bundle found in $dmg"
257+ hdiutil detach "$MOUNT" || true
258+ exit 1
259+ fi
260+ if ! codesign --verify --deep --strict --verbose=2 "$APP_PATH"; then
261+ echo "codesign verification failed for $APP_PATH"
262+ hdiutil detach "$MOUNT" || true
263+ exit 1
264+ fi
265+ if [ ! -d "$APP_PATH/Contents/_CodeSignature" ]; then
266+ echo "Missing _CodeSignature in $APP_PATH"
267+ hdiutil detach "$MOUNT" || true
268+ exit 1
269+ fi
270+ hdiutil detach "$MOUNT"
271+ done
272+ fi
273+
239274 - name : Sign macOS DMG (Developer ID)
240275 if : runner.os == 'macOS'
241276 shell : bash
@@ -478,6 +513,40 @@ jobs:
478513 rm -f "$RW_DMG"
479514 done
480515
516+ - name : Verify DMG contains signed app
517+ shell : bash
518+ run : |
519+ set -euo pipefail
520+ DMG_DIR="src-tauri/target/x86_64-apple-darwin/release/bundle/dmg"
521+ if [ -d "$DMG_DIR" ]; then
522+ for dmg in "$DMG_DIR"/*.dmg; do
523+ [ -f "$dmg" ] || continue
524+ echo "Verifying app inside: $dmg"
525+ MOUNT=$(hdiutil attach -nobrowse -readonly "$dmg" | awk '/Volumes/ {print $3; exit}')
526+ if [ -z "$MOUNT" ]; then
527+ echo "Failed to mount DMG for verification: $dmg"
528+ exit 1
529+ fi
530+ APP_PATH=$(find "$MOUNT" -maxdepth 2 -name "*.app" -print -quit)
531+ if [ -z "$APP_PATH" ]; then
532+ echo "No .app bundle found in $dmg"
533+ hdiutil detach "$MOUNT" || true
534+ exit 1
535+ fi
536+ if ! codesign --verify --deep --strict --verbose=2 "$APP_PATH"; then
537+ echo "codesign verification failed for $APP_PATH"
538+ hdiutil detach "$MOUNT" || true
539+ exit 1
540+ fi
541+ if [ ! -d "$APP_PATH/Contents/_CodeSignature" ]; then
542+ echo "Missing _CodeSignature in $APP_PATH"
543+ hdiutil detach "$MOUNT" || true
544+ exit 1
545+ fi
546+ hdiutil detach "$MOUNT"
547+ done
548+ fi
549+
481550 - name : Sign macOS DMG (Developer ID)
482551 shell : bash
483552 env :
0 commit comments