Skip to content

ci: remove temporary npm auth token configuration step#110

Open
litianningdatadog wants to merge 1 commit intomainfrom
tianning.li/remove-temp-token
Open

ci: remove temporary npm auth token configuration step#110
litianningdatadog wants to merge 1 commit intomainfrom
tianning.li/remove-temp-token

Conversation

@litianningdatadog
Copy link
Copy Markdown
Contributor

@litianningdatadog litianningdatadog commented Apr 2, 2026

Summary

  • Stop fetching token from secret.
  • Will rely on trusted deployment going forward (to be enabled by the Security team)

Test plan

  • Verify the publish workflow runs successfully after this change
  • Confirm npm packages are published correctly without the explicit token config step

🤖 Generated with Claude Code

The npm token is now handled via the setup-node action's registry-url,
making the explicit `npm config set` step redundant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 2, 2026 17:59
@litianningdatadog litianningdatadog requested review from a team as code owners April 2, 2026 17:59
@litianningdatadog litianningdatadog requested review from kathiehuang and lym953 and removed request for a team April 2, 2026 17:59
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

This PR removes an explicit npm authentication configuration step from the publish workflow, based on the claim that setup-node with registry-url already handles authentication via NODE_AUTH_TOKEN.

Changes:

  • Removes the manual npm config set step that was explicitly configuring the npm authentication token for publishing
Comments suppressed due to low confidence (1)

.github/workflows/publish.yml:132

  • The removed npm authentication configuration step was setting the authentication token for npm publish. While setup-node with registry-url does create an .npmrc file, it still requires the NODE_AUTH_TOKEN environment variable to be set for authentication to work. After this change, there is no mechanism to provide the authentication token to npm, which will cause the publish step to fail with authentication errors. The removed lines should either be replaced with an env section in the publish job that sets NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}, or the explicit token configuration should be restored.
      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
        with:
          node-version: "22.x"
          registry-url: 'https://registry.npmjs.org'
      - name: Publish npm packages
        run: |
          npm publish ./npm/datadog-serverless-compat-linux-x64 --provenance --access public
          npm publish ./npm/datadog-serverless-compat-linux-arm64 --provenance --access public
          npm publish ./npm/datadog-serverless-compat-win32-x64 --provenance --access public
          npm publish ./npm/datadog-serverless-compat-win32-ia32 --provenance --access public
          npm publish ./npm/datadog-serverless-compat-darwin-arm64 --provenance --access public

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.

2 participants