From 104fc7b796a907e937ad664d22bd0a4ec7146eac Mon Sep 17 00:00:00 2001 From: Ian Rumac Date: Mon, 1 Jun 2026 18:23:36 +0200 Subject: [PATCH] Allow pulish for first npm run --- .github/workflows/build-test-publish-superscript-npm.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish-superscript-npm.yml b/.github/workflows/build-test-publish-superscript-npm.yml index 939d90d..bb1d5ad 100644 --- a/.github/workflows/build-test-publish-superscript-npm.yml +++ b/.github/workflows/build-test-publish-superscript-npm.yml @@ -157,7 +157,14 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: | cd wasm - npm publish --access public + # Try a normal publish first; if it fails (e.g. first-time publish of a + # scoped package), retry with --access public. + if npm publish; then + echo "Published successfully with 'npm publish'" + else + echo "'npm publish' failed, retrying with --access public..." + npm publish --access public + fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file