Skip to content

Commit 4bdb762

Browse files
authored
Merge pull request #79 from AgentWorkforce/ci/pear-notary-hardening
ci(macos): retry release on transient notarization failure
2 parents 37c370d + 1b51e98 commit 4bdb762

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010
jobs:
1111
release:
1212
runs-on: macos-latest
13+
timeout-minutes: 120 # backstop for the notarization retry loop below
1314
steps:
1415
- name: Checkout
1516
uses: actions/checkout@v4
@@ -41,4 +42,17 @@ jobs:
4142
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
4243
# Publishing the GitHub Release
4344
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
run: npm run release:mac
45+
# electron-builder notarizes internally and has no per-attempt retry,
46+
# so Apple's transient notary drops (-1009) can fail an otherwise-good
47+
# build. Retry the whole build a few times; notarization runs before
48+
# publishing, so a failed attempt leaves nothing half-published.
49+
run: |
50+
for attempt in 1 2 3; do
51+
if npm run release:mac; then
52+
exit 0
53+
fi
54+
echo "release attempt ${attempt} failed; retrying in 60s..."
55+
sleep 60
56+
done
57+
echo "release failed after 3 attempts"
58+
exit 1

0 commit comments

Comments
 (0)