Skip to content

Commit

Permalink
ci(github actions): add publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chimurai committed Oct 6, 2024
1 parent c08cb1e commit 1bd6dd5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: yarn install

- name: Publish to NPM (beta)
if: 'github.event.release.prerelease'
run: npm publish --provenance --access public --tag v2-beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to NPM (stable)
if: '!github.event.release.prerelease'
run: npm publish --provenance --access public --tag v2
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v2.0.7](https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.7)

- ci(github actions): add publish.yml

## [v2.0.6](https://github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.6)

- fix(proxyReqWs): catch socket errors ([#763](https://github.com/chimurai/http-proxy-middleware/pull/763))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "http-proxy-middleware",
"version": "2.0.6",
"version": "2.0.7-beta.0",
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 1bd6dd5

Please # to comment.