Skip to content

Commit ae47ef8

Browse files
authored
feat(action): add support for preview and nightly versions (#281)
This change updates the action.yml to support installing the preview and nightly versions of the Gemini CLI from npm. It also updates the description of the gemini_cli_version input to clarify all the supported version formats. #274
1 parent 11742af commit ae47ef8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ go to the [Gemini Assistant workflow documentation](./examples/workflows/gemini-
170170
- <a name="use_gemini_code_assist"></a><a href="#user-content-use_gemini_code_assist"><code>use_gemini_code_assist</code></a>: _(Optional, default: `false`)_ Whether to use Code Assist for Gemini model access instead of the default Gemini API key.
171171
For more information, see the [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/authentication.md).
172172

173-
- <a name="gemini_cli_version"></a><a href="#user-content-gemini_cli_version"><code>gemini_cli_version</code></a>: _(Optional, default: `latest`)_ The version of the Gemini CLI to install.
173+
- <a name="gemini_cli_version"></a><a href="#user-content-gemini_cli_version"><code>gemini_cli_version</code></a>: _(Optional, default: `latest`)_ The version of the Gemini CLI to install. Can be "latest", "preview", "nightly", a specific version number, or a git branch, tag, or commit. For more information, see [Gemini CLI releases](https://github.com/google-gemini/gemini-cli/blob/main/docs/releases.md).
174174

175175
- <a name="google_api_key"></a><a href="#user-content-google_api_key"><code>google_api_key</code></a>: _(Optional)_ The Vertex AI API key to use with Gemini.
176176

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ inputs:
5656
required: false
5757
default: 'false'
5858
gemini_cli_version:
59-
description: 'The version of the Gemini CLI to install.'
59+
description: 'The version of the Gemini CLI to install. Can be "latest", "preview", "nightly", a specific version number, or a git branch, tag, or commit. For more information, see [Gemini CLI releases](https://github.com/google-gemini/gemini-cli/blob/main/docs/releases.md).'
6060
required: false
6161
default: 'latest'
6262
google_api_key:
@@ -132,7 +132,7 @@ runs:
132132
133133
VERSION_INPUT="${GEMINI_CLI_VERSION:-latest}"
134134
135-
if [[ "${VERSION_INPUT}" == "latest" || "${VERSION_INPUT}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.-]+)?(\+[a-zA-Z0-9\.-]+)?$ ]]; then
135+
if [[ "${VERSION_INPUT}" == "latest" || "${VERSION_INPUT}" == "preview" || "${VERSION_INPUT}" == "nightly" || "${VERSION_INPUT}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\.-]+)?(\+[a-zA-Z0-9\.-]+)?$ ]]; then
136136
echo "Installing Gemini CLI from npm: @google/gemini-cli@${VERSION_INPUT}"
137137
npm install --silent --no-audit --prefer-offline --global @google/gemini-cli@"${VERSION_INPUT}"
138138
else

0 commit comments

Comments
 (0)