File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You canβt perform that action at this time.
0 commit comments