Files
jrx/.github/workflows/publish.yml
Kenneth 8680ef66c8 Add setup-node step for npm registry auth (#8)
setup-node with registry-url configures the .npmrc with the OIDC
token needed for trusted publishing via bunx npm publish.

Co-authored-by: Ona <no-reply@ona.com>
2026-03-14 01:29:36 +00:00

36 lines
657 B
YAML

name: Publish to npm
on:
release:
types: [published]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: bun install
- run: bun run build
- run: bun test
- run: bunx npm publish --provenance --access public
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org