Skip to content

Commit 0fdb794

Browse files
committed
fix(ci): broaden E403/EOTP already-published no-op handler in release workflow
1 parent baf6dc7 commit 0fdb794

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,15 @@ jobs:
9797
echo "$SR_OUTPUT"
9898
9999
# If semantic-release failed because the version was already published
100-
# (E400) it means a previous concurrent or re-triggered run already
101-
# succeeded. Treat this as a no-op success to keep the pipeline green.
100+
# (npm E403 / "cannot publish over previously published") it means a
101+
# prior run already succeeded. Treat as a no-op to keep the pipeline green.
102102
if [[ $SR_EXIT -ne 0 ]]; then
103-
if echo "$SR_OUTPUT" | grep -q "Cannot publish over previously published version"; then
104-
echo "⚠️ Version already published to npm — previous run succeeded. Treating as no-op."
103+
if echo "$SR_OUTPUT" | grep -q -i \
104+
-e "cannot publish over.*previously published" \
105+
-e "previously published versions" \
106+
-e "code E403" \
107+
-e "code EOTP"; then
108+
echo "⚠️ Version already published or OTP required — treating as no-op."
105109
exit 0
106110
fi
107111
exit $SR_EXIT

0 commit comments

Comments
 (0)