Skip to content

chore(NODE-7563): migrate main release workflows to npm trusted publishers#4941

Merged
PavelSafronov merged 4 commits into
mainfrom
chore/NODE-7562-npm-trusted-publishers
May 19, 2026
Merged

chore(NODE-7563): migrate main release workflows to npm trusted publishers#4941
PavelSafronov merged 4 commits into
mainfrom
chore/NODE-7562-npm-trusted-publishers

Conversation

@tadjik1
Copy link
Copy Markdown
Member

@tadjik1 tadjik1 commented May 18, 2026

Description

Summary of Changes

Migrates release.yml (latest tag) and release-alpha.yml to npm Trusted Publishing by dispatching to the centralized npm-publish.yml workflow introduced in #4930. Also removes the dormant release-6.8.yml (6.8 branch is EOL; last release was 6.8.2 in Sep 2024).

Notes for Reviewers

Follows the pattern established for the nightly release in #4930. The key constraint: with workflow_call, the OIDC token's workflow_ref claim points to the caller's filename rather than npm-publish.yml, breaking npm Trusted Publishing's workflow-filename matching (see npm/documentation#1755). Using workflow_dispatch via dispatch-and-wait.mjs works around this.

Backport PRs: #4942 (5.x), #4943 (6.x)

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

…shers

Replace NPM_TOKEN with OIDC dispatch to npm-publish.yml in release.yml
and release-alpha.yml; remove dormant release-6.8.yml.
Move alphaVersion input to an env var so bash does not perform
command substitution on user-controlled input (semgrep finding).
@tadjik1 tadjik1 marked this pull request as ready for review May 18, 2026 11:05
Copilot AI review requested due to automatic review settings May 18, 2026 11:05
@tadjik1 tadjik1 requested a review from a team as a code owner May 18, 2026 11:05
@tadjik1 tadjik1 changed the title chore(NODE-7562): migrate main release workflows to npm trusted publishers chore(NODE-7563): migrate main release workflows to npm trusted publishers May 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the main (latest) and alpha release GitHub Actions workflows to npm Trusted Publishing by dispatching to the centralized npm-publish.yml workflow (OIDC-based), and removes the deprecated release-6.8.yml workflow.

Changes:

  • Update release.yml to dispatch npm-publish.yml instead of publishing directly with NPM_TOKEN.
  • Update release-alpha.yml to dispatch npm-publish.yml for alpha publishing.
  • Remove the dormant release-6.8.yml workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release.yml Switch latest release publishing to dispatch-and-wait.mjsnpm-publish.yml and update token permissions accordingly.
.github/workflows/release-alpha.yml Switch alpha publishing to dispatch-and-wait.mjsnpm-publish.yml and adjust permissions/inputs handling.
.github/workflows/release-6.8.yml Remove EOL release workflow.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

PavelSafronov
PavelSafronov previously approved these changes May 18, 2026
Comment thread .github/workflows/release-alpha.yml
@PavelSafronov PavelSafronov merged commit 90f6967 into main May 19, 2026
28 of 32 checks passed
@PavelSafronov PavelSafronov deleted the chore/NODE-7562-npm-trusted-publishers branch May 19, 2026 15:10
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