Skip to content

Use OIDC for npm publishing in publish-release.yml#450

Merged
compulim merged 6 commits intomasterfrom
copilot/modify-publish-release-using-oidc
Feb 4, 2026
Merged

Use OIDC for npm publishing in publish-release.yml#450
compulim merged 6 commits intomasterfrom
copilot/modify-publish-release-using-oidc

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Modify publish-release.yml to use OIDC

Following the pattern from continuous-deployment.yml (commits #446 and #447):

  • Update the publish-package job to use OIDC authentication
    • Add permissions block with contents: read and id-token: write
    • Update environment from simple string to object with name and url
    • Remove NODE_AUTH_TOKEN environment variable using secrets
    • Update Node.js version to 24 for OIDC publishing support
  • Verify the changes match the pattern from continuous-deployment.yml

Changes Made:

  1. Added permissions block to the publish-package job
  2. Converted environment: production to structured format with name and URL
  3. Removed NODE_AUTH_TOKEN secret-based authentication
  4. Updated Node.js version from 18 to 24 for OIDC support

Note on Validation:

The workflow already has version validation in the build-and-draft job that prevents prereleases from being published. No additional validation is needed in the publish-package job since the tarball artifact is only created if the version validation passes in the earlier job.

Original prompt

modify publish-release.yml and use OIDC, follow recent commits in continuous-deployment.yml.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: compulim <1622400+compulim@users.noreply.github.com>
Copilot AI changed the title [WIP] Modify publish-release.yml to use OIDC Use OIDC for npm publishing in publish-release.yml Feb 4, 2026
Copilot AI requested a review from compulim February 4, 2026 01:59
@compulim
Copy link
Collaborator

compulim commented Feb 4, 2026

@copilot add get-version step from continuous-deployment.yml

Co-authored-by: compulim <1622400+compulim@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot add get-version step from continuous-deployment.yml

Added validation step after get-version following the pattern from continuous-deployment.yml. The validation ensures only production versions (without -) are published. (6899dc5)

Co-authored-by: compulim <1622400+compulim@users.noreply.github.com>
@compulim
Copy link
Collaborator

compulim commented Feb 4, 2026

@copilot revert 6899dc5.

Co-authored-by: compulim <1622400+compulim@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot revert 6899dc5.

Reverted commit 6899dc5 which added the version validation step. (8ac4571)

@compulim compulim marked this pull request as ready for review February 4, 2026 02:19
Copilot AI requested a review from compulim February 4, 2026 02:19
@compulim compulim merged commit 8adbe6f into master Feb 4, 2026
7 checks passed
@compulim compulim deleted the copilot/modify-publish-release-using-oidc branch February 4, 2026 02:35
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.

3 participants