mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 21:07:00 -07:00
feat(ci): refactor release workflows for bundled and deprecated releases
This commit is contained in:
@@ -99,26 +99,50 @@ jobs:
|
||||
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
||||
working-directory: './release'
|
||||
|
||||
- name: 'Publish Release'
|
||||
uses: './.github/actions/publish-release-bundled'
|
||||
- name: 'Bundle'
|
||||
working-directory: './release'
|
||||
shell: 'bash'
|
||||
run: 'npm run bundle'
|
||||
|
||||
- name: 'Prepare Package for Publishing'
|
||||
if: "${{ vars.NPM_REGISTRY_SCOPE != '' }}"
|
||||
working-directory: './release'
|
||||
shell: 'bash'
|
||||
env:
|
||||
PACKAGE_SCOPE: '${{ vars.NPM_REGISTRY_SCOPE }}'
|
||||
run: 'node scripts/prepare-package.js --scope=${{ env.PACKAGE_SCOPE }}'
|
||||
|
||||
- name: 'Publish Bundle'
|
||||
uses: './.github/actions/publish-bundle'
|
||||
with:
|
||||
force-skip-tests: '${{ github.event.inputs.force_skip_tests }}'
|
||||
release-version: '${{ steps.release_info.outputs.RELEASE_VERSION }}'
|
||||
release-tag: '${{ github.event.inputs.version }}'
|
||||
npm-tag: '${{ github.event.inputs.npm_channel }}'
|
||||
wombat-token-cli: '${{ secrets.WOMBAT_TOKEN_CLI }}'
|
||||
version: '${{ steps.release_info.outputs.RELEASE_VERSION }}'
|
||||
tag: '${{ github.event.inputs.npm_channel }}'
|
||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
dry-run: '${{ github.event.inputs.dry_run }}'
|
||||
previous-tag: '${{ steps.release_info.outputs.PREVIOUS_TAG }}'
|
||||
skip-github-release: '${{ github.event.inputs.skip_github_release }}'
|
||||
working-directory: './release'
|
||||
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
||||
npm-registry-publish-url: '${{ vars.NPM_REGISTRY_PUBLISH_URL }}'
|
||||
npm-registry-url: '${{ vars.NPM_REGISTRY_URL }}'
|
||||
npm-registry-scope: '${{ vars.NPM_REGISTRY_SCOPE }}'
|
||||
cli-package-name: '${{ vars.CLI_PACKAGE_NAME }}'
|
||||
core-package-name: '${{ vars.CORE_PACKAGE_NAME }}'
|
||||
a2a-package-name: '${{ vars.A2A_PACKAGE_NAME }}'
|
||||
package-scope: '${{ vars.NPM_REGISTRY_SCOPE }}'
|
||||
|
||||
- name: '🔬 Verify Bundled NPM release by version'
|
||||
if: "${{ github.event.inputs.dry_run == false && github.event.inputs.force_skip_tests == false }}"
|
||||
working-directory: './release'
|
||||
shell: 'bash'
|
||||
env:
|
||||
CLI_PACKAGE_NAME: '${{ vars.CLI_PACKAGE_NAME }}'
|
||||
RELEASE_VERSION: '${{ steps.release_info.outputs.RELEASE_VERSION }}'
|
||||
run: |
|
||||
npx -y ${CLI_PACKAGE_NAME}@${RELEASE_VERSION} --version
|
||||
|
||||
- name: '🎉 Create GitHub Release'
|
||||
working-directory: './release'
|
||||
if: "${{ github.event.inputs.dry_run == false && github.event.inputs.skip_github_release == false && github.event.inputs.npm_channel != 'dev' && vars.NPM_REGISTRY_URL != 'https://npm.pkg.github.com/' }}"
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
RELEASE_TAG: '${{ github.event.inputs.version }}'
|
||||
PREVIOUS_TAG: '${{ steps.release_info.outputs.PREVIOUS_TAG }}'
|
||||
run: |
|
||||
gh release create "${RELEASE_TAG}" \
|
||||
bundle/gemini.js \
|
||||
--title "Release ${RELEASE_TAG}" \
|
||||
--notes-start-tag "${PREVIOUS_TAG}" \
|
||||
--generate-notes
|
||||
|
||||
- name: 'Create Issue on Failure'
|
||||
if: '${{ failure() && github.event.inputs.dry_run == false }}'
|
||||
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
working-directory: './release'
|
||||
|
||||
- name: 'Publish Release'
|
||||
uses: './.github/actions/publish-release'
|
||||
uses: './.github/actions/publish-release-deprecated'
|
||||
with:
|
||||
force-skip-tests: '${{ github.event.inputs.force_skip_tests }}'
|
||||
release-version: '${{ steps.release_info.outputs.RELEASE_VERSION }}'
|
||||
|
||||
@@ -227,7 +227,7 @@ jobs:
|
||||
run: 'npm ci'
|
||||
|
||||
- name: 'Publish Release'
|
||||
uses: './.github/actions/publish-release'
|
||||
uses: './.github/actions/publish-release-deprecated'
|
||||
with:
|
||||
release-version: '${{ needs.calculate-versions.outputs.PREVIEW_VERSION }}'
|
||||
release-tag: 'v${{ needs.calculate-versions.outputs.PREVIEW_VERSION }}'
|
||||
@@ -293,7 +293,7 @@ jobs:
|
||||
run: 'npm ci'
|
||||
|
||||
- name: 'Publish Release'
|
||||
uses: './.github/actions/publish-release'
|
||||
uses: './.github/actions/publish-release-deprecated'
|
||||
with:
|
||||
release-version: '${{ needs.calculate-versions.outputs.STABLE_VERSION }}'
|
||||
release-tag: 'v${{ needs.calculate-versions.outputs.STABLE_VERSION }}'
|
||||
|
||||
Reference in New Issue
Block a user