ci: skip main package publish if already on npm (mirrors platform package handling)

This commit is contained in:
Lex Christopherson 2026-03-13 16:31:50 -06:00
parent 17074c4db5
commit 6b63b51087

View file

@ -171,4 +171,11 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Skip prepublishOnly (build already done upstream) — just publish the tarball
npm publish --ignore-scripts
OUTPUT=$(npm publish --ignore-scripts 2>&1) && echo "$OUTPUT" || {
if echo "$OUTPUT" | grep -q "cannot publish over the previously published\|You cannot publish over"; then
echo "Already published, skipping"
else
echo "$OUTPUT"
exit 1
fi
}