ci: skip main package publish if already on npm (mirrors platform package handling)
This commit is contained in:
parent
17074c4db5
commit
6b63b51087
1 changed files with 8 additions and 1 deletions
9
.github/workflows/build-native.yml
vendored
9
.github/workflows/build-native.yml
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue