From 6b63b51087936a8f5998039cc276b40c0e683541 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 13 Mar 2026 16:31:50 -0600 Subject: [PATCH] ci: skip main package publish if already on npm (mirrors platform package handling) --- .github/workflows/build-native.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index ff770c679..3b409d83d 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -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 + }