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