Skip to content

Commit c18480f

Browse files
committed
fix: fetch notarization log on failure for debugging
1 parent 838aa1c commit c18480f

1 file changed

Lines changed: 24 additions & 7 deletions

File tree

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,33 @@ jobs:
7575
DMG_PATH=$(ls build/QuotaBar-*.dmg | head -1)
7676
echo "πŸ“€ Submitting ${DMG_PATH} for notarization..."
7777
78-
xcrun notarytool submit "$DMG_PATH" \
78+
# Submit and capture the submission ID
79+
SUBMIT_OUTPUT=$(xcrun notarytool submit "$DMG_PATH" \
7980
--apple-id "$APPLE_ID" \
8081
--password "$APPLE_APP_PASSWORD" \
8182
--team-id "$TEAM_ID" \
82-
--wait
83-
84-
echo "πŸ“Ž Stapling notarization ticket..."
85-
xcrun stapler staple "$DMG_PATH"
86-
87-
echo "βœ… Notarization complete"
83+
--wait 2>&1) || true
84+
85+
echo "$SUBMIT_OUTPUT"
86+
87+
# Extract submission ID
88+
SUBMISSION_ID=$(echo "$SUBMIT_OUTPUT" | grep "id:" | head -1 | awk '{print $2}')
89+
90+
# Check if notarization succeeded
91+
if echo "$SUBMIT_OUTPUT" | grep -q "status: Accepted"; then
92+
echo "πŸ“Ž Stapling notarization ticket..."
93+
xcrun stapler staple "$DMG_PATH"
94+
echo "βœ… Notarization complete"
95+
else
96+
echo "❌ Notarization failed! Fetching detailed log..."
97+
xcrun notarytool log "$SUBMISSION_ID" \
98+
--apple-id "$APPLE_ID" \
99+
--password "$APPLE_APP_PASSWORD" \
100+
--team-id "$TEAM_ID" \
101+
developer_log.json 2>&1 || true
102+
cat developer_log.json
103+
exit 1
104+
fi
88105
89106
# ── Clean up keychain ──────────────────────────────────────────────
90107
- name: Clean up keychain

0 commit comments

Comments
Β (0)