# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
  release:
    types: [created]
permissions:
  id-token: write  # Required for OIDC
  contents: read

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - run: rm -rf .npmrc
      - name: Install Node
        uses: actions/setup-node@v4
        with:
          node-version: 24
          registry-url: https://registry.npmjs.org/
      # - name: Debug npmrc
      #   run: cat .npmrc
      - uses: pnpm/action-setup@v4
        name: Install pnpm
        with:
          version: 10
          run_install: true
      - name: Publish
        run: |
          npm run build
          npm publish

      
