Update GitHub Actions workflow for npm security compliance (2025)#15
Merged
Conversation
Co-authored-by: kentcdodds <1500684+kentcdodds@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GitHub Actions workflows for trusted publishers
Update GitHub Actions workflow for npm security compliance (2025)
Oct 23, 2025
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.
This PR modernizes the GitHub Actions release workflow to comply with the 2025 npm authentication and token management changes.
Changes
Action Versions
actions/checkoutfrom v4 to v5actions/setup-nodefrom v4 to v6cycjimmy/semantic-release-actionfrom v4 to v5.0.2Node.js Version
node-versionfrom20tolts/*to automatically use the latest LTS version without manual updatesSemantic Release
semantic_versionfrom 17 to 25 to use the current major versionnpm Authentication
NPM_TOKENfrom environment variables - npm releases now use GitHub's OIDC authentication for provenanceid-token: writepermission enables secure OIDC-based authenticationNPM_CONFIG_PROVENANCE: truecontinues to ensure npm package provenanceSecurity Improvements
This update eliminates the need for long-lived npm tokens, replacing them with short-lived OIDC tokens that are automatically generated by GitHub Actions. This significantly reduces the attack surface and improves the security posture of the release process.
The workflow permissions remain unchanged and correctly configured:
contents: write- to publish GitHub releasesid-token: write- to enable OIDC for npm provenanceissues: write- to comment on released issuespull-requests: write- to comment on released PRsVerification
Original prompt
Fixes #14
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Modernizes the release GitHub Actions workflow by upgrading action versions, switching Node to lts/*, bumping semantic-release to v25, and removing NPM_TOKEN in favor of OIDC.
.github/workflows/release.yml):actions/checkoutv4 → v5actions/setup-nodev4 → v6cycjimmy/semantic-release-actionv4 → v5.0.2node-version20→lts/*.semantic_version17→25.NPM_TOKENfrom env (use OIDC/provenance).Written by Cursor Bugbot for commit 3c325eb. This will update automatically on new commits. Configure here.