From 9856a67b4cdcbf534c641cc81888dc3bd7e067e3 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Wed, 22 Oct 2025 00:34:01 -0700 Subject: [PATCH] fix(ci): Create .npmrc file for GitHub Packages publishing Updates the 'prepare-github-release.js' script to create an '.npmrc' file in the root directory. This ensures that the 'npm publish' command is properly authenticated with the GitHub Packages registry, preventing the 'ENEEDAUTH' error during the publish step. --- scripts/prepare-github-release.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/prepare-github-release.js b/scripts/prepare-github-release.js index 681452a6c9..1ddf212af3 100644 --- a/scripts/prepare-github-release.js +++ b/scripts/prepare-github-release.js @@ -38,4 +38,9 @@ updatePackageJson('packages/core/package.json', (pkg) => { pkg.name = '@google-gemini/gemini-cli-core'; }); +// Create .npmrc for publishing to GitHub Packages +const npmrcContent = `@google-gemini:registry=https://npm.pkg.github.com/`; +fs.writeFileSync(path.resolve(rootDir, '.npmrc'), npmrcContent); +console.log('Created .npmrc for @google-gemini scope.'); + console.log('Successfully prepared packages for GitHub release.');