mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
Releasing: Patching e2e coordination (#8723)
This commit is contained in:
@@ -44,9 +44,13 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isDryRun = body.includes('[DRY RUN]');
|
const isDryRun = body.includes('[DRY RUN]');
|
||||||
|
|
||||||
|
// Extract base version and channel from hotfix branch name
|
||||||
|
// e.g., hotfix/v0.5.3/cherry-pick-abc -> v0.5.3
|
||||||
const version = headRef.split('/')[1];
|
const version = headRef.split('/')[1];
|
||||||
const channel = version.includes('preview') ? 'preview' : 'stable';
|
const channel = version.includes('preview') ? 'preview' : 'stable';
|
||||||
const ref = `release/${version}`;
|
const releaseRef = `release/${version}`;
|
||||||
|
|
||||||
const workflow_id = context.eventName === 'pull_request'
|
const workflow_id = context.eventName === 'pull_request'
|
||||||
? 'release-patch-3-release.yml'
|
? 'release-patch-3-release.yml'
|
||||||
: '${{ github.event.inputs.workflow_id }}';
|
: '${{ github.event.inputs.workflow_id }}';
|
||||||
@@ -55,11 +59,10 @@ jobs:
|
|||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
workflow_id: workflow_id,
|
workflow_id: workflow_id,
|
||||||
ref: 'mk-patch-releases',
|
ref: 'main',
|
||||||
inputs: {
|
inputs: {
|
||||||
type: channel,
|
type: channel,
|
||||||
dry_run: isDryRun.toString(),
|
dry_run: isDryRun.toString(),
|
||||||
version: version,
|
release_ref: releaseRef
|
||||||
release_ref: ref
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,10 +15,11 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
default: true
|
default: true
|
||||||
version:
|
force_skip_tests:
|
||||||
description: 'The version to release.'
|
description: 'Select to skip the "Run Tests" step in testing. Prod releases should run tests'
|
||||||
required: true
|
required: false
|
||||||
type: 'string'
|
type: 'boolean'
|
||||||
|
default: false
|
||||||
release_ref:
|
release_ref:
|
||||||
description: 'The branch, tag, or SHA to release from.'
|
description: 'The branch, tag, or SHA to release from.'
|
||||||
required: true
|
required: true
|
||||||
@@ -33,9 +34,16 @@ jobs:
|
|||||||
issues: 'write'
|
issues: 'write'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
|
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: 'Checkout Release Code'
|
||||||
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
||||||
with:
|
with:
|
||||||
ref: '${{ github.event.inputs.release_ref }}'
|
ref: '${{ github.event.inputs.release_ref }}'
|
||||||
|
path: 'release'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 'Setup Node.js'
|
- name: 'Setup Node.js'
|
||||||
@@ -45,24 +53,49 @@ jobs:
|
|||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: 'Install Dependencies'
|
- name: 'Install Dependencies'
|
||||||
|
working-directory: './release'
|
||||||
run: |-
|
run: |-
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
|
- name: 'Print Inputs'
|
||||||
|
shell: 'bash'
|
||||||
|
run: |-
|
||||||
|
echo "${{ toJSON(inputs) }}"
|
||||||
|
|
||||||
- name: 'Get Patch Version'
|
- name: 'Get Patch Version'
|
||||||
id: 'patch_version'
|
id: 'patch_version'
|
||||||
|
env:
|
||||||
|
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
run: |
|
run: |
|
||||||
echo "RELEASE_TAG=${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
|
# Use the existing get-release-version.js script to calculate patch version
|
||||||
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
|
# Run from main checkout which has full git history and access to npm
|
||||||
echo "NPM_TAG=${{ github.event.inputs.type }}" >> "${GITHUB_OUTPUT}"
|
PATCH_JSON=$(node scripts/get-release-version.js --type=patch --patch-from=${{ github.event.inputs.type }})
|
||||||
|
echo "Patch version calculation result: ${PATCH_JSON}"
|
||||||
|
|
||||||
|
RELEASE_VERSION=$(echo "${PATCH_JSON}" | jq -r .releaseVersion)
|
||||||
|
RELEASE_TAG=$(echo "${PATCH_JSON}" | jq -r .releaseTag)
|
||||||
|
NPM_TAG=$(echo "${PATCH_JSON}" | jq -r .npmTag)
|
||||||
|
PREVIOUS_TAG=$(echo "${PATCH_JSON}" | jq -r .previousReleaseTag)
|
||||||
|
|
||||||
|
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "RELEASE_TAG=${RELEASE_TAG}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "NPM_TAG=${NPM_TAG}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: 'Print Calculated Version'
|
- name: 'Print Calculated Version'
|
||||||
run: |-
|
run: |-
|
||||||
echo "Calculated version: ${{ steps.patch_version.outputs.RELEASE_VERSION }}"
|
echo "Patch Release Summary:"
|
||||||
|
echo " Release Version: ${{ steps.patch_version.outputs.RELEASE_VERSION }}"
|
||||||
|
echo " Release Tag: ${{ steps.patch_version.outputs.RELEASE_TAG }}"
|
||||||
|
echo " NPM Tag: ${{ steps.patch_version.outputs.NPM_TAG }}"
|
||||||
|
echo " Previous Tag: ${{ steps.patch_version.outputs.PREVIOUS_TAG }}"
|
||||||
|
|
||||||
- name: 'Run Tests'
|
- name: 'Run Tests'
|
||||||
uses: './.github/actions/run-tests'
|
uses: './.github/actions/run-tests'
|
||||||
with:
|
with:
|
||||||
|
force_skip_tests: '${{ github.event.inputs.force_skip_tests }}'
|
||||||
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
||||||
|
working-directory: './release'
|
||||||
|
|
||||||
- name: 'Publish Release'
|
- name: 'Publish Release'
|
||||||
uses: './.github/actions/publish-release'
|
uses: './.github/actions/publish-release'
|
||||||
@@ -74,7 +107,8 @@ jobs:
|
|||||||
wombat-token-cli: '${{ secrets.WOMBAT_TOKEN_CLI }}'
|
wombat-token-cli: '${{ secrets.WOMBAT_TOKEN_CLI }}'
|
||||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
dry-run: '${{ github.event.inputs.dry_run }}'
|
dry-run: '${{ github.event.inputs.dry_run }}'
|
||||||
previous-tag: '${{ steps.patch_version.outputs.RELEASE_TAG }}'
|
previous-tag: '${{ steps.patch_version.outputs.PREVIOUS_TAG }}'
|
||||||
|
working-directory: './release'
|
||||||
|
|
||||||
- name: 'Create Issue on Failure'
|
- name: 'Create Issue on Failure'
|
||||||
if: '${{ failure() && github.event.inputs.dry_run == false }}'
|
if: '${{ failure() && github.event.inputs.dry_run == false }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user