Skip to content

Commit 060f8e1

Browse files
AlexMikhalevclaude
andcommitted
fix(ci): use NODE_AUTH_TOKEN env var for npm publish
setup-node action creates .npmrc at temp location, so we need to use NODE_AUTH_TOKEN env var instead of manual ~/.npmrc. Added debug output to verify token is set correctly. Terraphim AI Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9466285 commit 060f8e1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/publish-bun.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,16 @@ jobs:
450450
- name: Publish to npm (works with Bun)
451451
env:
452452
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
453+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
453454
run: |
455+
# Debug: verify token is set (shows first/last 4 chars only)
456+
if [[ -n "$NODE_AUTH_TOKEN" ]]; then
457+
echo "NODE_AUTH_TOKEN is set: ${NODE_AUTH_TOKEN:0:8}...${NODE_AUTH_TOKEN: -4}"
458+
else
459+
echo "ERROR: NODE_AUTH_TOKEN is not set!"
460+
exit 1
461+
fi
462+
454463
if [[ "${{ inputs.dry_run }}" == "true" ]]; then
455464
echo "Dry run mode - checking package only"
456465
npm publish --dry-run --access public --tag ${{ steps.strategy.outputs.npm_tag }}

0 commit comments

Comments
 (0)