# .github/workflows/publish.yml

name: Publish

on:
  release:
    types: [published]

permissions:
  id-token: write
  contents: read

jobs:
  publish_jsr:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx jsr publish

  publish_npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # Setup .npmrc file to publish to npm
      - uses: actions/setup-node@v4
        with:
          node-version: '24'
          registry-url: 'https://registry.npmjs.org'
      - run: npm ci
      - run: npm publish
