mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-31 06:02:47 -07:00
ci: publish packages to GitHub and use in Windows E2E tests
This commit is contained in:
@@ -10,6 +10,45 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish_packages:
|
||||
name: 'Publish Packages to GitHub'
|
||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
||||
|
||||
- name: 'Set up Node.js'
|
||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm ci'
|
||||
|
||||
- name: 'Build project'
|
||||
run: 'npm run build'
|
||||
|
||||
- name: 'Set version with SHA'
|
||||
run: |
|
||||
npm version 0.0.0-${{ github.sha }} --no-git-tag-version --workspaces
|
||||
shell: 'bash'
|
||||
|
||||
- name: 'Configure npm for GitHub Packages'
|
||||
run: |
|
||||
echo "//npm.pkg.github.com/:_authToken=\${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
|
||||
echo "@google:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
||||
shell: 'bash'
|
||||
|
||||
- name: 'Publish Packages'
|
||||
run: |
|
||||
npm publish --workspace @google/gemini-cli-core
|
||||
npm publish --workspace @google/gemini-cli
|
||||
shell: 'bash'
|
||||
|
||||
build_bundle:
|
||||
name: 'Build Bundle'
|
||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||
@@ -372,30 +411,26 @@ jobs:
|
||||
|
||||
test_e2e_windows:
|
||||
name: 'e2e:windows'
|
||||
needs: build_bundle
|
||||
needs: publish_packages
|
||||
runs-on: 'gemini-cli-windows-16-core'
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
||||
|
||||
- name: 'Download Bundle'
|
||||
uses: 'actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806'
|
||||
with:
|
||||
name: 'gemini-bundle'
|
||||
path: 'bundle'
|
||||
|
||||
- name: 'Set up Node.js'
|
||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install targeted test dependencies'
|
||||
run: 'npm install vitest node-pty --no-save'
|
||||
- name: 'Configure npm for GitHub Packages'
|
||||
run: |
|
||||
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > "$env:USERPROFILE\.npmrc"
|
||||
echo "@google:registry=https://npm.pkg.github.com" >> "$env:USERPROFILE\.npmrc"
|
||||
shell: 'pwsh'
|
||||
|
||||
- name: 'Build project'
|
||||
run: 'npm run build'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm install @google/gemini-cli@0.0.0-${{ github.sha }} @google/gemini-cli-core@0.0.0-${{ github.sha }} vitest node-pty --no-save'
|
||||
shell: 'pwsh'
|
||||
|
||||
- name: 'Run Integration Tests'
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/google-gemini/gemini-cli.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/google-gemini/gemini-cli.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user