chore: upgrade deps and modernize CI/CD #9
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
| name: "Publish" | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| registry-url: "https://registry.npmjs.org" | |
| # Trusted publishing needs npm CLI >= 11.5.1; | |
| - run: | | |
| npm install --global npm@latest | |
| npm install --global pnpm@latest | |
| pnpm install --no-frozen-lockfile | |
| pnpm lint | |
| pnpm test | |
| pnpm build | |
| - name: Dry-run npm publish | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }} | |
| run: npm publish --dry-run --access public | |
| # OIDC trusted publishing: no NODE_AUTH_TOKEN, provenance is generated automatically. | |
| - name: Publish to npm | |
| if: ${{ github.event_name == 'push' || inputs.dry_run == false }} | |
| run: npm publish --access public |