v3.0.7 #29
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 npmjs | |
| on: | |
| release: | |
| types: [prereleased, released] | |
| jobs: | |
| build-and-publish: | |
| # prevents this action from running on forks | |
| if: github.repository == 'chimurai/http-proxy-middleware' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Required for OIDC | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| # Ensure npm 11.5.1 or later is installed | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Install Dependencies | |
| run: yarn install --frozen-lockfile --ignore-scripts | |
| - name: Publish to NPM (beta) | |
| if: 'github.event.release.prerelease' | |
| run: npm stage publish --access public --tag v3-beta | |
| - name: Publish to NPM (stable) | |
| if: '!github.event.release.prerelease' | |
| run: npm stage publish --access public --tag v3-latest |