# This workflow publishes a package to NPM

name: Publish package

on:
  release:
    types: [published]
  workflow_dispatch:

permissions:
  contents: read
  id-token: write # For OIDC Trusted Publishing

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
        with:
          registry-url: https://registry.npmjs.org
          node-version: 24
          cache: 'npm'
      - run: npm ci
      - run: npm publish --access public
