v1.1.1 #3
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 to npm | |
| on: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # required for npm trusted publishing (OIDC) | |
| steps: | |
| - name: check out repository | |
| uses: actions/checkout@v4 | |
| - name: set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org | |
| - name: update npm # trusted publishing needs | |
| run: npm install -g npm@latest # npm 11.5.1 or newer | |
| - name: install dependencies # no "npm ci" - the lock file | |
| run: npm install --no-audit --no-fund # is deliberately not committed | |
| - name: run test suite | |
| run: npm run test:run | |
| - name: build library | |
| run: npm run build | |
| - name: publish package | |
| run: npm publish |