name: JSR Publish
on:
  workflow_dispatch:

jobs:
  publish:
    runs-on: ubuntu-latest

    permissions:
      contents: read
      id-token: write

    steps:
      - uses: actions/checkout@v4
      - uses: denoland/setup-deno@v2
        with:
          deno-version: v2.x
      - name: Publish package
        working-directory: ./packages/api
        run: |
          deno install
          npx jsr publish --allow-slow-types
