From 3af3d526bc88b5c3cb593ee5165f481a499fd8b5 Mon Sep 17 00:00:00 2001 From: Nastassia Fulconis Date: Thu, 6 Nov 2025 08:40:34 -0800 Subject: [PATCH 1/4] fix: manually configure .npmrc for npm authentication - Remove registry-url from setup-node (causes conflicts) - Add explicit .npmrc configuration step with NPM_TOKEN - Matches pattern from working type-graphql release workflow --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9955be..6c35ea4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' - registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci @@ -33,6 +32,12 @@ jobs: - name: Build run: npm run build + - name: Configure npm authentication + run: | + echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -43,3 +48,4 @@ jobs: title: 'chore: version packages' env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 90f9a0e60c77812425a4fda3e5c125334d2e9798 Mon Sep 17 00:00:00 2001 From: Nastassia Fulconis Date: Thu, 6 Nov 2025 08:46:47 -0800 Subject: [PATCH 2/4] chore: add changeset for npm auth fix --- .changeset/fix-npm-auth.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-npm-auth.md diff --git a/.changeset/fix-npm-auth.md b/.changeset/fix-npm-auth.md new file mode 100644 index 0000000..a0548fd --- /dev/null +++ b/.changeset/fix-npm-auth.md @@ -0,0 +1,5 @@ +--- +"@scope3/agentic-client": patch +--- + +Fix npm authentication in release workflow by manually configuring .npmrc file From 4c0a2bc3e601902c273ccfd52b9094ae6bfc91aa Mon Sep 17 00:00:00 2001 From: Nastassia Fulconis Date: Thu, 6 Nov 2025 09:44:07 -0800 Subject: [PATCH 3/4] fix: update npm version and fix token escaping in .npmrc - Add npm update step to ensure npm 11.5.1+ is installed - Fix token variable escaping in .npmrc (remove backslash) - This should properly write the actual token value instead of literal ${NPM_TOKEN} --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c35ea4..505a560 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,9 @@ jobs: with: node-version: '20' + - name: Update npm + run: npm install -g npm@latest + - name: Install dependencies run: npm ci @@ -34,7 +37,7 @@ jobs: - name: Configure npm authentication run: | - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 5af2872d13b328b3a4e31541cb45ebb9b768673c Mon Sep 17 00:00:00 2001 From: Nastassia Fulconis Date: Thu, 6 Nov 2025 09:55:14 -0800 Subject: [PATCH 4/4] fix release? --- .github/workflows/release.yml | 13 +------------ package.json | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 505a560..e52c426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -32,15 +31,6 @@ jobs: - name: Install dependencies run: npm ci - - name: Build - run: npm run build - - - name: Configure npm authentication - run: | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -50,5 +40,4 @@ jobs: commit: 'chore: version packages' title: 'chore: version packages' env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 0d01a39..46e50bb 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "pretest": "npm run type-check", "changeset": "changeset", "version": "changeset version", - "release": "npm run build && changeset publish" + "release": "npm run build && npm publish" }, "keywords": [ "scope3",