From 6f4a84b0ce81f1ab09118f42f096bc023508d867 Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Sat, 16 May 2026 02:04:54 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20release=20workflow=20npm=20auth=20?= =?UTF-8?q?=E2=80=94=20write=20.npmrc=20with=20NODE=5FAUTH=5FTOKEN=20befor?= =?UTF-8?q?e=20npm=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37df07f..02cb589 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,8 +27,14 @@ jobs: node-version: '22' - name: Build admin UI + env: + NODE_AUTH_TOKEN: ${{ secrets.RELEASES_TOKEN }} run: | git clone --depth 1 https://github.com/GoCodeAlone/workflow.git /tmp/workflow-ui-build + # Write .npmrc so npm ci can authenticate to GitHub Packages + # (fetch of @gocodealone/workflow-ui from npm.pkg.github.com). + # Captured failure in workflow-plugin-admin#13 v1.0.1 release run. + echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > /tmp/workflow-ui-build/ui/.npmrc cd /tmp/workflow-ui-build/ui && npm ci && npx vite build rm -rf internal/ui_dist && cp -r /tmp/workflow-ui-build/ui/dist internal/ui_dist rm -rf /tmp/workflow-ui-build