Skip to content

Commit 5e33377

Browse files
Fixing releasing to npmjs.com - id-token permission required for OIDC
Added permissions for contents and id-token in the release job.
1 parent 047a362 commit 5e33377

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/reusable-release.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
release:
2424
name: Release a package in GitHub & publish to NPM registry
2525
runs-on: ubuntu-latest
26+
permissions:
27+
contents: write # For git operations
28+
id-token: write # < REQUIRED FOR OIDC
2629
steps:
2730
- uses: actions/checkout@v4
2831

@@ -86,6 +89,8 @@ jobs:
8689
registry-url: https://registry.npmjs.org
8790
scope: '@zaiusinc'
8891

92+
# OIDC authorization (https://github.com/release-it/release-it/blob/main/docs/npm.md)
93+
# requires connecting to GitHub repo and workflow in package settings in npmjs.com
8994
- name: release-and-publish-to-npm
9095
if: ${{ inputs.release_to_npm }}
9196
run: |

0 commit comments

Comments
 (0)