Skip to content

Conversation

@gnbm
Copy link
Contributor

@gnbm gnbm commented Nov 6, 2025

What is the current behavior?

  • Release workflows (release-dev, release-nightly, release-production) and the reusable publish-npm action still inject a long-lived NPM_TOKEN, so they do not use npm’s trusted-publisher/OIDC flow.

GitHub Issue Number: N/A

What is the new behavior?

  • Configure the reusable publish-npm action to set up Node with the npm registry, upgrade npm, and publish with provenance using the OIDC credential.
  • Remove .npmrc token writes from the dev and nightly workflows; they now rely solely on the reusable action.
  • Inline the same OIDC setup for the production workflow before running npm run release.ci.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

  • Not run (GitHub Actions workflow update only).

Other information

  • Aligns all release workflows with npm’s trusted-publishing requirements so the branch can pass new registry enforcement.

@gnbm gnbm added the github_actions Pull requests that update GitHub Actions code label Nov 6, 2025
@gnbm gnbm marked this pull request as ready for review November 6, 2025 15:40
@gnbm gnbm requested a review from a team as a code owner November 6, 2025 15:40
Copy link
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

This PR modernizes the GitHub Actions workflows for Stencil's release pipelines by updating action versions and simplifying NPM authentication configuration.

  • Updates actions/checkout from v4.1.7 to v5.0.0 and actions/setup-node from an implicit usage to explicit v6.0.0 across all release workflows
  • Replaces manual .npmrc token configuration with actions/setup-node registry configuration
  • Adds emoji prefixes to workflow step names for improved visual scanning

Reviewed Changes

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

File Description
.github/workflows/release-production.yml Updates action versions, replaces manual NPM token setup with actions/setup-node configuration, and adds step to ensure latest npm version
.github/workflows/release-nightly.yml Updates action versions, adds emoji step names, and modifies token parameter name from token to github-token
.github/workflows/release-dev.yml Updates action versions, adds emoji step names, and modifies token parameter name from token to github-token
.github/workflows/actions/publish-npm/action.yml Removes manual .npmrc configuration, adds actions/setup-node with registry configuration, adds new inputs for node-version and registry-url, and removes token input
Comments suppressed due to low confidence (1)

.github/workflows/release-production.yml:71

  • The npm run release.ci command likely performs publishing operations that require NPM authentication. Since the manual .npmrc configuration was removed, you need to add env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} to this step to ensure proper authentication when the publish scripts run.
      - name: 📦 Run Publish Scripts
        # pass the generated version number instead of the input, since we've already incremented it in the prerelease
        # step
        run: npm run release.ci -- --tag ${{ inputs.tag }}
        shell: bash

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gnbm gnbm requested a review from Copilot November 9, 2025 16:12
Copy link
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 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/release-production.yml:71

  • The npm run release.ci command likely performs npm publish, but no NODE_AUTH_TOKEN environment variable is set on this step. After configuring actions/setup-node with registry-url at line 58, you need to provide authentication. Add env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} to this step, or ensure the entire job has access to this environment variable if using token-based authentication. Alternatively, if relying on OIDC with provenance (given the id-token: write permission), verify that the release.ci script properly supports this authentication method.
      - name: 📦 Run Publish Scripts
        # pass the generated version number instead of the input, since we've already incremented it in the prerelease
        # step
        run: npm run release.ci -- --tag ${{ inputs.tag }}
        shell: bash

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gnbm gnbm requested a review from Copilot November 9, 2025 16:16
Copy link
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 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/release-production.yml:71

  • The npm run release.ci command likely performs npm publish operations but is missing the NODE_AUTH_TOKEN environment variable. When using actions/setup-node with registry-url, authentication requires setting NODE_AUTH_TOKEN in the environment.

Add an env section to this step:

- name: 📦 Run Publish Scripts
  run: npm run release.ci -- --tag ${{ inputs.tag }}
  shell: bash
  env:
    NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
      - name: 📦 Run Publish Scripts
        # pass the generated version number instead of the input, since we've already incremented it in the prerelease
        # step
        run: npm run release.ci -- --tag ${{ inputs.tag }}
        shell: bash

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gnbm gnbm requested a review from Copilot November 9, 2025 16:24
Copy link
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 4 out of 4 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

.github/workflows/release-production.yml:71

  • The npm run release.ci command likely performs npm publish operations but is missing the required NODE_AUTH_TOKEN environment variable. Add an env section with NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} to enable authentication with the npm registry.
      - name: 📦 Run Publish Scripts
        # pass the generated version number instead of the input, since we've already incremented it in the prerelease
        # step
        run: npm run release.ci -- --tag ${{ inputs.tag }}
        shell: bash

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gnbm gnbm enabled auto-merge November 13, 2025 16:18
@gnbm gnbm added this pull request to the merge queue Nov 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 13, 2025
@gnbm gnbm added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 6b01357 Nov 13, 2025
69 checks passed
@gnbm gnbm deleted the gm/review-publish-npm-ga branch November 13, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants