Node.js Package #7
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 tests using node and then publish a package to npm when a release is created | |
| # Uses OIDC trusted publishing - no npm token required! | |
| # For more information see: https://docs.npmjs.com/trusted-publishers/ | |
| name: Node.js Package | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - run: npm run build --if-present | |
| - run: npm test | |
| publish-npm: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC authentication | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - run: npm ci | |
| - run: npm publish --provenance --access public |