release: v2.5.142 stable #336
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: Node.js Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ github.ref }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm i --legacy-peer-deps | |
| - run: npm test | |
| publish-npm: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ github.ref }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Upgrade npm for OIDC support (requires >=11.5.1) | |
| run: npm install -g npm@latest | |
| - run: npm i --legacy-peer-deps | |
| - name: Publish to npm | |
| run: | | |
| if [[ "${{ github.ref }}" == *-beta ]]; then | |
| npm publish --tag beta | |
| elif [[ "${{ github.ref }}" == *-lts ]]; then | |
| npm publish --tag lts | |
| else | |
| npm publish | |
| fi |