Skip to content

fix: release workflow npm auth — write .npmrc with NODE_AUTH_TOKEN before npm ci#14

Merged
intel352 merged 1 commit into
mainfrom
fix/release-npm-auth
May 16, 2026
Merged

fix: release workflow npm auth — write .npmrc with NODE_AUTH_TOKEN before npm ci#14
intel352 merged 1 commit into
mainfrom
fix/release-npm-auth

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

Closes #13.

The Build-admin-UI step runs npm ci against the workflow repo's ui/ directory (cloned to /tmp). That fetches @gocodealone/workflow-ui from npm.pkg.github.com (private GitHub Packages registry) which requires authentication. The v1.0.1 release run failed with:

npm error code E401
npm error 401 Unauthorized - GET https://npm.pkg.github.com/download/@gocodealone/workflow-ui/...
  — authentication token not provided

Fix: pass NODE_AUTH_TOKEN (set to RELEASES_TOKEN — same PAT already used elsewhere in this workflow for private module fetch) and write /tmp/workflow-ui-build/ui/.npmrc with the GitHub Packages auth line before running npm ci.

Followup

After this lands, cut v1.0.2 chore release to re-trigger GoReleaser against main HEAD. The v1.0.1 pin-bump shipped via the tag (Go module proxy resolves correctly); v1.0.2 republishes the operator-facing GitHub release assets.

Test plan

  • YAML valid (1-line env block + 1-line echo before existing cd && npm ci)
  • Post-merge: tag v1.0.2; verify gh release view v1.0.2 --repo GoCodeAlone/workflow-plugin-admin --json assets,isDraft reports draft=false assets≥4

🤖 Generated with Claude Code

…fore npm ci

Closes #13.

The Build-admin-UI step in .github/workflows/release.yml runs
`npm ci` against /tmp/workflow-ui-build/ui (a clone of the workflow
repo). That npm install fetches @gocodealone/workflow-ui from
npm.pkg.github.com (private GitHub Packages registry), which requires
authentication.

The v1.0.1 release run failed with:
  npm error code E401
  npm error 401 Unauthorized - GET https://npm.pkg.github.com/download/@gocodealone/workflow-ui/...
    — authentication token not provided

Fix: pass NODE_AUTH_TOKEN (set to RELEASES_TOKEN, the same PAT used
elsewhere in this workflow for private module fetch) and write
/tmp/workflow-ui-build/ui/.npmrc with the GitHub Packages auth line
before running `npm ci`.

After this lands, cut v1.0.2 chore release to re-trigger GoReleaser
against main HEAD (the v1.0.1 pin-bump shipped via tag; v1.0.2 just
republishes assets via the now-working npm auth path).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 16, 2026 06:05
Copy link
Copy Markdown

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

Fixes the Release workflow's Build-admin-UI step failing with HTTP 401 when npm ci fetches the private @gocodealone/workflow-ui package from GitHub Packages. The step now writes an .npmrc with an auth token before running npm ci.

Changes:

  • Add NODE_AUTH_TOKEN env (sourced from RELEASES_TOKEN) to the Build admin UI step.
  • Write /tmp/workflow-ui-build/ui/.npmrc with the GitHub Packages auth line before npm ci.

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

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.

Release workflow npm auth — npm.pkg.github.com 401 on @gocodealone/workflow-ui fetch

2 participants