From c7b0f70800d52f46ef13ed2781475b5f70616a86 Mon Sep 17 00:00:00 2001 From: almog8k Date: Tue, 30 Dec 2025 18:08:51 +0200 Subject: [PATCH] fix: update publish workflow to improve permissions and checkout action --- .github/workflows/publish.yaml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 693aee5..2a85f50 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,24 +1,17 @@ -name: publish - on: workflow_dispatch: - release: + release: types: [published] +permissions: + id-token: write # Required for OIDC + contents: read + jobs: publish: runs-on: ubuntu-latest - permissions: - contents: read - packages: write # allow GITHUB_TOKEN to publish packages steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Init nodejs uses: ./.github/actions/init-npm - with: - node-version: 20.x - - name: Copy resources - run: npm run copy - - uses: JS-DevTools/npm-publish@v3 - with: - token: ${{ secrets.NPM_TOKEN }} + - run: npm publish --access public \ No newline at end of file