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 <noreply@anthropic.com>
25 lines
414 B
YAML
25 lines
414 B
YAML
name: Publish to npm
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- run: bun install
|
|
|
|
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- run: npm publish
|