fix(ci): Add npmrc configuration to E2E workflow

This commit adds a step to the E2E workflow to create an .npmrc file and configure it with the necessary credentials for the GitHub Packages registry. This resolves the '401 Unauthorized' error that was occurring during the 'npm ci' step.
This commit is contained in:
mkorwel
2025-10-21 18:02:54 -07:00
parent 46b1c59a47
commit a28ff41a75
+16
View File
@@ -77,6 +77,11 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: 'Install dependencies'
run: 'npm ci'
@@ -130,6 +135,11 @@ jobs:
with:
node-version: '20.x'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: 'Install dependencies'
run: 'npm ci'
@@ -200,6 +210,12 @@ jobs:
npm config set registry https://registry.npmjs.org/
shell: 'pwsh'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
shell: 'pwsh'
- name: 'Install dependencies'
run: 'npm ci'
shell: 'pwsh'