name: Release to NPM on: workflow_dispatch: # No input required release: types: [published] jobs: build: uses: ./.github/workflows/build.yml deploy_release: name: Publish npm package needs: [build] runs-on: [ubuntu-latest] permissions: contents: read id-token: write steps: - uses: actions/checkout@v4 with: submodules: true fetch-depth: 100 - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' cache: npm - run: npm ci - run: npm run build env: release: true - run: npm publish --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}