| 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created |
| 2 | # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages |
| 3 | |
| 4 | name: Node.js Package |
| 5 | |
| 6 | on: |
| 7 | release: |
| 8 | types: [created] |
| 9 | |
| 10 | permissions: |
| 11 | id-token: write # Required for OIDC |
| 12 | contents: read |
| 13 | |
| 14 | jobs: |
| 15 | build: |
| 16 | runs-on: ubuntu-latest |
| 17 | steps: |
| 18 | - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 |
| 19 | - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 |
| 20 | with: |
| 21 | node-version: 24 |
| 22 | - run: npm ci --omit=dev --ignore-scripts |
| 23 | |
| 24 | publish-npm: |
| 25 | needs: build |
| 26 | runs-on: ubuntu-latest |
| 27 | steps: |
| 28 | - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 |
| 29 | - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 |
| 30 | with: |
| 31 | node-version: 24 |
| 32 | registry-url: https://registry.npmjs.org/ |
| 33 | - run: npm ci --omit=dev --ignore-scripts |
| 34 | - run: npm publish |