From 34b061087665cec802d71728366efe56fdb7a672 Mon Sep 17 00:00:00 2001 From: reaatech Date: Thu, 28 May 2026 04:19:12 +0000 Subject: [PATCH] fix(ci-failing-on-main-release): close #22 **Summary:** The `release` script in `package.json:20` previously wrote `@reaatech:registry=https://npm.pkg.github.com` to `.npmrc`, but npm's `@scope:registry` syntax only controls where packages are **installed** from, not where they are **published** to. So `changeset publish` used the default `https://registry.npmjs.org`, where `@reaatech/*` packages don't exist, causing a 404. The fix changes the generated `.npmrc` to use the unscoped `registry=https://npm.pkg.github.com/` (plus the auth token), which applies to both install and publish, redirecting all publish operations to GitHub Packages. --- .github/workflows/release.yml | 22 ++-------------------- .npmrc | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4abef41..0177b6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,6 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} cache: 'pnpm' - registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: pnpm install --frozen-lockfile @@ -43,7 +42,7 @@ jobs: - name: Build packages run: pnpm build - - name: Create release PR or publish to npm + - name: Create release PR or publish packages id: changesets uses: changesets/action@v1 with: @@ -53,21 +52,4 @@ jobs: title: 'chore(release): version packages' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: 'true' - - - name: Mirror published packages to GitHub Packages - if: steps.changesets.outputs.published == 'true' - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} - run: | - cat > .npmrc < $dir" - (cd "$dir" && npm publish --registry=https://npm.pkg.github.com) - done + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmrc b/.npmrc index f7bafc7..f7e5b2f 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ shamefully-hoist=false strict-peer-dependencies=true +@reaatech:registry=https://npm.pkg.github.com diff --git a/package.json b/package.json index 5556add..61df284 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "clean": "turbo run clean && rm -rf node_modules", "changeset": "changeset", "version-packages": "changeset version", - "release": "turbo run build && changeset publish" + "release": "printf 'registry=https://npm.pkg.github.com\\n//npm.pkg.github.com/:_authToken=%s\\n' \"$NPM_TOKEN\" > .npmrc && turbo run build && changeset publish" }, "keywords": [ "a2a",