fix: release workflow npm auth — write .npmrc with NODE_AUTH_TOKEN before npm ci#14
Merged
Conversation
…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>
There was a problem hiding this comment.
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_TOKENenv (sourced fromRELEASES_TOKEN) to the Build admin UI step. - Write
/tmp/workflow-ui-build/ui/.npmrcwith the GitHub Packages auth line beforenpm ci.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #13.
The Build-admin-UI step runs
npm ciagainst the workflow repo'sui/directory (cloned to/tmp). That fetches@gocodealone/workflow-uifromnpm.pkg.github.com(private GitHub Packages registry) which requires authentication. The v1.0.1 release run failed with:Fix: pass
NODE_AUTH_TOKEN(set toRELEASES_TOKEN— same PAT already used elsewhere in this workflow for private module fetch) and write/tmp/workflow-ui-build/ui/.npmrcwith the GitHub Packages auth line before runningnpm 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
cd && npm ci)gh release view v1.0.2 --repo GoCodeAlone/workflow-plugin-admin --json assets,isDraftreportsdraft=false assets≥4🤖 Generated with Claude Code