Skip to content

Commit 758586e

Browse files
committed
ci(github-actions): enable OIDC and trusted publishing for npm release workflow
1 parent 1a0df93 commit 758586e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
create-release:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
id-token: write
912

1013
steps:
1114
- name: Checkout code
@@ -35,17 +38,15 @@ jobs:
3538
- name: Docker Build & Push (multi-arch)
3639
run: npm run docker:buildx
3740

38-
# Publish to NPM
41+
# Publish to NPM (OIDC / Trusted Publishing)
3942
- name: Setup Node for npmjs
4043
uses: actions/setup-node@v4
4144
with:
4245
node-version: 22
4346
registry-url: 'https://registry.npmjs.org/'
4447
- name: Publish to npmjs.org
4548
working-directory: release/sync-in-server
46-
env:
47-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
run: npm publish
49+
run: npm publish --provenance
4950

5051
- name: Extract changelog for current version
5152
id: changelog

0 commit comments

Comments
 (0)