Skip to content

Commit cac5c06

Browse files
committed
refactor: update npm publish workflow for clarity and consistency
1 parent ad7a9fc commit cac5c06

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
name: Publish new version to NPM
1+
name: Publish to npm
22

33
on:
44
push:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: read
10+
id-token: write
11+
812
jobs:
9-
publish_to_npm:
13+
publish:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
contents: read
13-
id-token: write
1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@v4
1718

1819
- name: Setup Node.js
1920
uses: actions/setup-node@v4
2021
with:
21-
node-version: 22
22-
cache: 'npm'
23-
registry-url: 'https://registry.npmjs.org'
22+
node-version: 20
23+
cache: npm
24+
registry-url: https://registry.npmjs.org
2425

2526
- name: Install dependencies
2627
run: npm ci
@@ -37,7 +38,5 @@ jobs:
3738
- name: Build package
3839
run: npm run build
3940

40-
- name: Publish to NPM
41-
run: npm publish
42-
env:
43-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
41+
- name: Publish to npm
42+
run: npm publish --access public

0 commit comments

Comments
 (0)