Skip to content

Conversation

@343dev
Copy link
Owner

@343dev 343dev commented Dec 23, 2025

TL;DR

Updated GitHub Actions workflow for npm publishing with improved security and newer action versions.

What changed?

  • Moved permissions from job level to workflow level for better security
  • Removed the actions: write permission as it's no longer needed
  • Updated actions/checkout from v4 to v6
  • Updated actions/setup-node from v4 to v6
  • Removed the --provenance flag from the npm publish command
  • Removed the NODE_AUTH_TOKEN environment variable and associated secret

How to test?

  1. Trigger the workflow by completing a successful run on the main branch
  2. Verify that the npm package is published correctly without using the token-based authentication
  3. Confirm that the OIDC-based authentication works properly with the id-token permission

Why make this change?

This change modernizes the npm publishing workflow by:

  1. Using the latest versions of GitHub Actions
  2. Adopting a more secure approach by moving to OIDC-based authentication instead of token-based authentication
  3. Simplifying the workflow by removing unnecessary permissions and environment variables
  4. Following best practices by defining permissions at the workflow level

Copy link
Owner Author

343dev commented Dec 23, 2025

@343dev 343dev self-assigned this Dec 23, 2025
@343dev 343dev marked this pull request as ready for review December 23, 2025 03:31
@343dev 343dev merged commit c7f83e7 into main Dec 23, 2025
6 of 8 checks passed
@343dev 343dev deleted the 12-23-configure_trusted_publishing_for_npm_package branch December 23, 2025 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant