Skip to content

Bug: release publish job fails without npm auth #317

@tmchow

Description

@tmchow

Bug Description

The release workflow's publish-cli job fails during npm publish because the workflow does not configure npm authentication before publishing.

What Happened

Release run 23276128503 succeeded in the release-pr job, created tag cli-v2.45.0, and then failed in publish-cli.

Failing job:
https://github.com/EveryInc/compound-engineering-plugin/actions/runs/23276128503/job/67679481990

Observed error:

npm error code ENEEDAUTH
npm error need auth This command requires you to be logged in to https://registry.npmjs.org/
npm error need auth You need to authorize this machine using `npm adduser`

Expected Behavior

The release workflow should authenticate to npm before running npm publish --provenance --access public.

Root Cause

In .github/workflows/release-pr.yml, the publish job sets up Node but does not configure npm registry auth:

  • actions/setup-node@v4 only sets node-version
  • the publish step does not provide NODE_AUTH_TOKEN
  • no registry-url is configured for npmjs

Relevant workflow lines:

  • .github/workflows/release-pr.yml:89-95

Current shape:

- name: Setup Node.js for release
  uses: actions/setup-node@v4
  with:
    node-version: "24"

- name: Publish package
  run: npm publish --provenance --access public

Suggested Fix

Update the publish job to configure npm auth, for example:

- name: Setup Node.js for release
  uses: actions/setup-node@v4
  with:
    node-version: "24"
    registry-url: https://registry.npmjs.org

- name: Publish package
  run: npm publish --provenance --access public
  env:
    NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Also verify the repository or organization has a valid NPM_TOKEN secret with publish access for @every-env/compound-plugin.

Additional Context

This did not fail in tests or release metadata validation. The failure is isolated to npm publishing.

GitHub Docs reference for setup-node npm auth:
https://docs.github.com/en/actions/tutorials/build-and-test-code/nodejs

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions