From 9764e96ed6a4652a5feee6d4d81c8a805af860d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:09:07 +0000 Subject: [PATCH] Fix npm publish auth in CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Write .npmrc with auth token before publishing — NODE_AUTH_TOKEN alone is not picked up by npm without a registry-scoped config entry. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/publish.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b998996..4388e4a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Publish to npm on: push: tags: - - "v*" + - 'v*' jobs: publish: @@ -17,6 +17,8 @@ jobs: - run: bun install - - run: npm publish + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - run: npm publish