mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
feat(release): Add dev support to patch2 workflow (#11460)
This commit is contained in:
12
.github/workflows/release-patch-2-trigger.yml
vendored
12
.github/workflows/release-patch-2-trigger.yml
vendored
@@ -18,7 +18,7 @@ on:
|
||||
type: 'string'
|
||||
default: 'main'
|
||||
workflow_id:
|
||||
description: 'The workflow to trigger. Defaults to patch-release.yml'
|
||||
description: 'The workflow to trigger. Defaults to release-patch-3-release.yml'
|
||||
required: false
|
||||
type: 'string'
|
||||
default: 'release-patch-3-release.yml'
|
||||
@@ -37,11 +37,20 @@ on:
|
||||
required: false
|
||||
type: 'boolean'
|
||||
default: false
|
||||
environment:
|
||||
description: 'Environment'
|
||||
required: false
|
||||
type: 'choice'
|
||||
options:
|
||||
- 'prod'
|
||||
- 'dev'
|
||||
default: 'prod'
|
||||
|
||||
jobs:
|
||||
trigger-patch-release:
|
||||
if: "(github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'hotfix/')) || github.event_name == 'workflow_dispatch'"
|
||||
runs-on: 'ubuntu-latest'
|
||||
environment: '${{ github.event.inputs.environment }}'
|
||||
permissions:
|
||||
actions: 'write'
|
||||
contents: 'write'
|
||||
@@ -74,5 +83,6 @@ jobs:
|
||||
GITHUB_EVENT_PAYLOAD: '${{ toJSON(github.event) }}'
|
||||
FORCE_SKIP_TESTS: '${{ github.event.inputs.force_skip_tests }}'
|
||||
TEST_MODE: '${{ github.event.inputs.test_mode }}'
|
||||
ENVIRONMENT: '${{ github.event.inputs.environment }}'
|
||||
run: |
|
||||
node scripts/releasing/patch-trigger.js --dry-run=${{ github.event.inputs.dry_run }}
|
||||
|
||||
@@ -81,6 +81,11 @@ async function main() {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
})
|
||||
.option('environment', {
|
||||
choices: ['prod', 'dev'],
|
||||
type: 'string',
|
||||
default: process.env.ENVIRONMENT || 'prod',
|
||||
})
|
||||
.example(
|
||||
'$0 --head-ref "hotfix/v0.5.3/preview/cherry-pick-abc1234" --test',
|
||||
'Test channel detection logic',
|
||||
@@ -105,6 +110,7 @@ async function main() {
|
||||
|
||||
// Get inputs from CLI args or environment
|
||||
const headRef = argv.headRef || process.env.HEAD_REF;
|
||||
const environment = argv.environment;
|
||||
const body = argv.prBody || process.env.PR_BODY || '';
|
||||
const isDryRun = argv.dryRun || body.includes('[DRY RUN]');
|
||||
const forceSkipTests =
|
||||
@@ -226,6 +232,8 @@ async function main() {
|
||||
'--field',
|
||||
`release_ref=${releaseRef}`,
|
||||
'--field',
|
||||
`environment=${environment}`,
|
||||
'--field',
|
||||
originalPr ? `original_pr=${originalPr.toString()}` : 'original_pr=',
|
||||
];
|
||||
|
||||
@@ -259,6 +267,7 @@ async function main() {
|
||||
const commentBody = `🚀 **Patch Release Started!**
|
||||
|
||||
**📋 Release Details:**
|
||||
- **Environment**: \`${environment}\`
|
||||
- **Channel**: \`${channel}\` → publishing to npm tag \`${npmTag}\`
|
||||
- **Version**: \`${version}\`
|
||||
- **Hotfix PR**: Merged ✅
|
||||
|
||||
Reference in New Issue
Block a user