fix: update Node.js version to 24 and enable provenance for NPM release #53
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will run lints & tests then create a GitHub release and publish a package to NPM | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
| name: Release | |
| on: | |
| push: | |
| tags: [v*] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: 'NPM release' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| cache: 'yarn' | |
| cache-dependency-path: yarn.lock | |
| - name: Build project | |
| run: | | |
| yarn install --frozen-lockfile | |
| yarn validate | |
| yarn test | |
| yarn build | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| - name: NPM Release | |
| run: npm publish --access public --provenance | |
| env: | |
| NPM_CONFIG_PROVENANCE: true |