Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

ci(github-actions): enable OIDC and trusted publishing for npm release workflow

johaven758586e266fc
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0fbac7dd..bbe0f860 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,6 +6,9 @@ on:
jobs:
create-release:
runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ id-token: write
steps:
- name: Checkout code
@@ -35,7 +38,7 @@ jobs:
- name: Docker Build & Push (multi-arch)
run: npm run docker:buildx
- # Publish to NPM
+ # Publish to NPM (OIDC / Trusted Publishing)
- name: Setup Node for npmjs
uses: actions/setup-node@v4
with:
@@ -43,9 +46,7 @@ jobs:
registry-url: 'https://registry.npmjs.org/'
- name: Publish to npmjs.org
working-directory: release/sync-in-server
- env:
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
+ run: npm publish --provenance
- name: Extract changelog for current version
id: changelog