Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment: npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
permissions:
id-token: write
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore read access when enabling OIDC permissions

This job now sets permissions to only id-token: write, which revokes all other GITHUB_TOKEN scopes by default; GitHub docs note unspecified scopes become none, and actions/checkout recommends contents: read for proper operation. In environments where anonymous repository reads are not available (for example private repos or stricter org token policies), the checkout/download path in this job can fail with authorization errors before npm publish runs, so contents: read should be added back alongside id-token: write.

Useful? React with 👍 / 👎.

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/download-artifact@v4
- uses: actions/setup-node@v3
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- id: pkg
Expand Down
Loading