Skip to content

Commit a8aeec5

Browse files
m2declaude
andcommitted
Harden npm publish to tolerate individual platform failures
A single platform package hitting the npm spam filter was preventing the shim package from being published. The loop now continues on failure and reports warnings instead of aborting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f411862 commit a8aeec5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,21 @@ jobs:
171171
"getapi-cli-win32-x64"
172172
)
173173
174+
failed=""
174175
for pkg in "${PLATFORMS[@]}"; do
175176
echo "Publishing ${pkg}..."
176177
cd "npm/${pkg}"
177-
npm publish --access public
178+
if ! npm publish --access public; then
179+
echo "::warning::Failed to publish ${pkg}"
180+
failed="${failed} ${pkg}"
181+
fi
178182
cd ../..
179183
done
180184
185+
if [ -n "$failed" ]; then
186+
echo "::warning::Some platform packages failed to publish:${failed}"
187+
fi
188+
181189
- name: Publish shim package
182190
env:
183191
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)