name: Publish to npm on: release: types: [published] jobs: publish: runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 registry-url: https://registry.npmjs.org # npm's OIDC trusted publishing requires npm >= 11.5.1; Node 22 ships npm 10.x. - run: npm install -g npm@latest - run: npm ci - run: npm run typecheck - run: npm run build - run: npm test - run: npm publish --access public --provenance