Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to npm

on:
release:
types:
- published
# Manual backfill (e.g. publishing an existing tag after wiring OIDC).
workflow_dispatch:

permissions:
contents: read
id-token: write

concurrency:
group: npm-${{ github.event.release.tag_name || github.run_id }}
cancel-in-progress: false

jobs:
publish:
name: publish
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
package-manager-cache: false

- name: Install dependencies
run: npm ci

- name: Verify build and tests
run: npm test

- name: Verify package contents
run: npm pack --dry-run

# OIDC trusted publishing (no tokens): requires the trusted publisher
# configured on npmjs.com for this repo + publish.yml workflow.
- name: Publish with provenance
run: npm publish --access public --provenance
Loading