mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(release): align nightly workflow with release patterns
Refactors the release-nightly.yml workflow to follow the established pattern used by other release workflows (release-manual, release-patch, etc.). This change introduces a dedicated release subdirectory for the checkout, ensuring that all subsequent steps and local composite actions operate on a consistent and specific version of the code. This resolves an issue where the workflow could inadvertently execute stale or incorrect versions of actions from the default branch.
This commit is contained in:
@@ -30,29 +30,33 @@ jobs:
|
|||||||
issues: 'write'
|
issues: 'write'
|
||||||
pull-requests: 'write'
|
pull-requests: 'write'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout Release Code'
|
||||||
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8'
|
||||||
with:
|
with:
|
||||||
ref: '${{ github.event.inputs.ref }}'
|
ref: '${{ github.event.inputs.ref }}'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
path: 'release'
|
||||||
|
|
||||||
- name: 'Setup Node.js'
|
- name: 'Setup Node.js'
|
||||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
|
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: './release/.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: 'Install Dependencies'
|
- name: 'Install Dependencies'
|
||||||
|
working-directory: './release'
|
||||||
run: 'npm ci'
|
run: 'npm ci'
|
||||||
|
|
||||||
- name: 'Run Tests'
|
- name: 'Run Tests'
|
||||||
if: "${{github.event.inputs.force_skip_tests != 'true'}}"
|
if: "${{github.event.inputs.force_skip_tests != 'true'}}"
|
||||||
uses: './.github/actions/run-tests'
|
uses: './.github/actions/run-tests'
|
||||||
|
working-directory: './release'
|
||||||
with:
|
with:
|
||||||
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
|
||||||
|
|
||||||
- name: 'Get Nightly Version'
|
- name: 'Get Nightly Version'
|
||||||
id: 'nightly_version'
|
id: 'nightly_version'
|
||||||
|
working-directory: './release'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
run: |
|
run: |
|
||||||
@@ -73,6 +77,7 @@ jobs:
|
|||||||
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.nightly_version.outputs.PREVIOUS_TAG }}'
|
previous-tag: '${{ steps.nightly_version.outputs.PREVIOUS_TAG }}'
|
||||||
|
working-directory: './release'
|
||||||
|
|
||||||
- name: 'Create and Merge Pull Request'
|
- name: 'Create and Merge Pull Request'
|
||||||
uses: './.github/actions/create-pull-request'
|
uses: './.github/actions/create-pull-request'
|
||||||
@@ -82,6 +87,7 @@ jobs:
|
|||||||
pr-body: 'Automated version bump for nightly release.'
|
pr-body: 'Automated version bump for nightly release.'
|
||||||
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
||||||
dry-run: '${{ github.event.inputs.dry_run }}'
|
dry-run: '${{ github.event.inputs.dry_run }}'
|
||||||
|
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