Update publish workflow to use latest actions and permissions#36
Open
Update publish workflow to use latest actions and permissions#36
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the npm release publishing workflow to use newer GitHub Actions and shift publishing authentication toward OIDC-based trusted publishing with npm provenance, as part of an OIDC migration effort.
Changes:
- Bumped
actions/checkoutandactions/setup-nodeto@v4and set Node to24. - Added job-level permissions (
contents: read,id-token: write) to support OIDC. - Switched publish command to
npm publish --provenanceand removed secret-basedNODE_AUTH_TOKENusage.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/publish.yml | Modernizes the publish workflow actions/Node version and updates publishing to use OIDC permissions with npm provenance. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 3
Comment on lines
+12
to
+27
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 14 | ||
| node-version: 24 | ||
| registry-url: https://registry.npmjs.org/ | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npm test | ||
| - run: npm version ${TAG_NAME} --git-tag-version=false | ||
| env: | ||
| TAG_NAME: ${{ github.event.release.tag_name }} | ||
| - run: npm whoami; npm --ignore-scripts publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
| - run: npm --ignore-scripts publish --provenance |
| publish-npm: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of: https://github.com/github/web-systems/issues/4309
OIDC migration