diff --git a/.gcp/release-docker.yaml b/.gcp/release-docker.yaml index 6a8924a4ca..547c3c22ee 100644 --- a/.gcp/release-docker.yaml +++ b/.gcp/release-docker.yaml @@ -24,11 +24,17 @@ steps: args: - -c - | - if [ "$_OFFICIAL_RELEASE" = "true" ]; then + export GEMINI_SANDBOX_IMAGE_TAG="$SHORT_SHA" # Default to SHA + if [[ "$TAG_NAME" == *"+nightly"* ]]; then + echo "Nightly release detected." + export GEMINI_SANDBOX_IMAGE_TAG="${TAG_NAME#v}" + elif [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Official release detected." export GEMINI_SANDBOX_IMAGE_TAG="${TAG_NAME#v}" else - export GEMINI_SANDBOX_IMAGE_TAG="$SHORT_SHA" + echo "Development/RC release detected. Using commit SHA as tag." fi + echo "Using Docker image tag: $GEMINI_SANDBOX_IMAGE_TAG" npm run build:sandbox:fast env: - 'GEMINI_SANDBOX=$_CONTAINER_TOOL' @@ -40,11 +46,17 @@ steps: args: - -c - | - if [ "$_OFFICIAL_RELEASE" = "true" ]; then + export GEMINI_SANDBOX_IMAGE_TAG="$SHORT_SHA" # Default to SHA + if [[ "$TAG_NAME" == *"+nightly"* ]]; then + echo "Nightly release detected." + export GEMINI_SANDBOX_IMAGE_TAG="${TAG_NAME#v}" + elif [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Official release detected." export GEMINI_SANDBOX_IMAGE_TAG="${TAG_NAME#v}" else - export GEMINI_SANDBOX_IMAGE_TAG="$SHORT_SHA" + echo "Development/RC release detected. Using commit SHA as tag." fi + echo "Using Docker image tag: $GEMINI_SANDBOX_IMAGE_TAG" npm run publish:sandbox env: - 'GEMINI_SANDBOX=$_CONTAINER_TOOL' @@ -54,5 +66,4 @@ options: dynamicSubstitutions: true substitutions: - _OFFICIAL_RELEASE: 'false' _CONTAINER_TOOL: 'docker' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f973a08218..4fe30f6938 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,7 +149,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.WOMBAT_TOKEN_CORE }} - name: Install latest core package - run: npm install @google/gemini-cli-core@${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli --save-exact + run: npm install @google/gemini-cli-core@${{ steps.version.outputs.NPM_TAG }} --workspace=@google/gemini-cli --save-exact - name: Publish @google/gemini-cli run: npm publish --workspace=@google/gemini-cli --tag=${{ steps.version.outputs.NPM_TAG }} ${{ inputs.dry_run && '--dry-run' || '' }}