Skip to content

Commit 9abd51f

Browse files
authored
ci(github-actions): update publish.yml
1 parent d0f7d63 commit 9abd51f

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/publish.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@ on:
55
jobs:
66
build-and-publish:
77
# prevents this action from running on forks
8-
if: github.repository == 'chimurai/http-proxy-middleware'
8+
# only allow listed user to publish
9+
if: |
10+
github.repository == 'chimurai/http-proxy-middleware' &&
11+
github.triggering_actor == 'chimurai'
912
runs-on: ubuntu-latest
1013
permissions:
1114
contents: read
12-
id-token: write
15+
id-token: write # Required for OIDC
1316
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
17+
- uses: actions/checkout@v6
1618
with:
17-
node-version: '22.x'
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
- uses: actions/setup-node@v6
21+
with:
22+
node-version: '24.x'
1823
registry-url: 'https://registry.npmjs.org'
1924

25+
# Ensure npm 11.5.1 or later is installed
26+
- name: Update npm
27+
run: npm install -g npm@latest
28+
2029
- name: Install Dependencies
21-
run: yarn install
30+
run: yarn install --frozen-lockfile --ignore-scripts
2231

2332
- name: Publish to NPM (beta)
2433
if: 'github.event.release.prerelease'
25-
run: npm publish --provenance --access public --tag v2-beta
26-
env:
27-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
run: npm stage publish --access public --tag v2-beta
2835

2936
- name: Publish to NPM (stable)
3037
if: '!github.event.release.prerelease'
31-
run: npm publish --provenance --access public --tag v2-latest
32-
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
run: npm stage publish --access public --tag v2-latest

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "http-proxy-middleware",
3-
"version": "2.0.9",
3+
"version": "2.0.10-beta.0",
44
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)