Skip to content

Commit 6bc2c3a

Browse files
committed
ci(workflow): streamline npm publish workflow and adjust permissions
- Rename job from `build` to `publish` for clarity. - Simplify permissions block by moving it out of the job level. - Remove unused environment variable `NODE_AUTH_TOKEN`. - Refine `pnpm run` commands for publishing.
1 parent a80c312 commit 6bc2c3a

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
8-
build:
12+
publish:
913
runs-on: ubuntu-latest
10-
permissions:
11-
contents: read
12-
id-token: write
1314
steps:
1415
- uses: actions/checkout@v4
1516

@@ -26,6 +27,4 @@ jobs:
2627
cache: 'pnpm'
2728

2829
- run: pnpm install
29-
- run: pnpm run build && pnpm publish --provenance --access public --no-git-checks
30-
env:
31-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
30+
- run: pnpm run build && pnpm publish

0 commit comments

Comments
 (0)