Skip to content

v4.0.0

v4.0.0 #22

Workflow file for this run

name: publish to npmjs
on:
release:
types: [prereleased, released]
jobs:
build-and-publish:
# prevents this action from running on forks
# only allow listed user to publish
if: |
github.repository == 'chimurai/http-proxy-middleware' &&
github.triggering_actor == 'chimurai'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for OIDC
steps:
- uses: actions/checkout@v6
- 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@~11.10.0
- name: Install Dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Publish to NPM (beta)
if: 'github.event.release.prerelease'
run: npm publish --access public --tag beta
- name: Publish to NPM (stable)
if: '!github.event.release.prerelease'
run: npm publish --access public