Compare commits

...

9 Commits

Author SHA1 Message Date
mkorwel 2e0c70b1a1 move to prerelease nightly 2025-07-04 00:31:00 -07:00
mkorwel 11472c6fc2 handle versions for nightly 2025-07-04 00:19:51 -07:00
mkorwel 97900e31c4 dry up docker 2025-07-03 23:53:13 -07:00
mkorwel 59825a6c60 merge conflicts wihtmyself 2025-07-03 23:37:47 -07:00
mkorwel 6e05729dd9 15th time is a charm 2025-07-03 23:08:17 -07:00
mkorwel b378a99a59 15th time is a charm 2025-07-03 22:51:30 -07:00
mkorwel cf0e3d342c grr 2025-07-03 22:38:15 -07:00
mkorwel fb034d9602 linting 2025-07-03 22:10:22 -07:00
mkorwel 553ca4a858 fix tagging for nightly 2025-07-03 22:06:12 -07:00
3 changed files with 68 additions and 11 deletions
+38 -7
View File
@@ -17,34 +17,66 @@ steps:
entrypoint: 'npm'
args: ['run', 'build:packages']
# Step 6: Build sandbox container image
# Step 6: Determine Docker Image Tag
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
id: 'Determine Docker Image Tag'
entrypoint: 'bash'
args:
- -c
- |
IMAGE_TAG="$SHORT_SHA" # Default to SHA
if [[ "$TAG_NAME" == *"+nightly"* ]]; then
echo "Nightly release detected."
IMAGE_TAG="${TAG_NAME#v}"
elif [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Official release detected."
IMAGE_TAG="${TAG_NAME#v}"
else
echo "Development/RC release detected. Using commit SHA as tag."
fi
echo "Determined image tag: $IMAGE_TAG"
echo "$IMAGE_TAG" > /workspace/image_tag.txt
# Step 7: Build sandbox container image
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
id: 'Build sandbox Docker image'
entrypoint: 'bash'
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'
# Step 7: Publish sandbox container image
# Step 8: Publish sandbox container image
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
id: 'Publish sandbox Docker image'
entrypoint: 'bash'
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 +86,4 @@ options:
dynamicSubstitutions: true
substitutions:
_OFFICIAL_RELEASE: 'false'
_CONTAINER_TOOL: 'docker'
+29 -3
View File
@@ -93,11 +93,29 @@ jobs:
git switch -c $BRANCH_NAME
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
- name: Update package versions
- name: Update package versions for stable release
if: steps.version.outputs.NPM_TAG != 'nightly'
run: |
npm run release:version ${{ steps.version.outputs.RELEASE_VERSION }}
- name: Set package versions for nightly release
if: steps.version.outputs.NPM_TAG == 'nightly'
run: |
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }}
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli-core
npm install
- name: Set package versions for nightly release
if: steps.version.outputs.NPM_TAG == 'nightly'
run: |
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }}
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli
npm pkg set version=${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli-core
npm install
- name: Commit package versions
id: commit_step
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -106,8 +124,10 @@ jobs:
echo "Changes detected, creating commit."
git commit -m "chore(release): ${{ steps.version.outputs.RELEASE_TAG }}"
git push --set-upstream origin ${{ steps.release_branch.outputs.BRANCH_NAME }} --follow-tags
echo "committed=true" >> $GITHUB_OUTPUT
else
echo "No version changes to commit."
echo "committed=false" >> $GITHUB_OUTPUT
fi
- name: Create GitHub Release and Tag
@@ -115,10 +135,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCH: ${{ steps.release_branch.outputs.BRANCH_NAME }}
COMMITTED: ${{ steps.commit_step.outputs.committed }}
run: |
TARGET_COMMITISH="main"
if [[ "$COMMITTED" == "true" ]]; then
TARGET_COMMITISH="$RELEASE_BRANCH"
fi
echo "Creating release against target: $TARGET_COMMITISH"
gh release create ${{ steps.version.outputs.RELEASE_TAG }} \
bundle/gemini.js \
--target "$RELEASE_BRANCH" \
--target "$TARGET_COMMITISH" \
--title "Release ${{ steps.version.outputs.RELEASE_TAG }}" \
--generate-notes
@@ -140,7 +166,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' || '' }}
+1 -1
View File
@@ -51,7 +51,7 @@
"publish:release": "npm run prepare:package && npm run build:packages && npm run build:sandbox:fast && npm run publish:sandbox && npm run publish:npm",
"prepublishOnly": "node scripts/check-versions.js && node scripts/prepublish.js",
"release:version": "node scripts/version.js",
"tag:release:nightly": "TAG_NAME=\"v$(node -p \"require('./package.json').version\")+nightly.$(date -u +%d%m%y).$(git rev-parse --short HEAD)\"; git tag -a $TAG_NAME -m '' && git push origin $TAG_NAME",
"tag:release:nightly": "TAG_NAME=\"v$(node -p \"require('./package.json').version\")-nightly.$(date -u +%Y%m%d).$(git rev-parse --short HEAD)\"; git tag -a $TAG_NAME -m '' && git push origin $TAG_NAME",
"check:versions": "node scripts/check-versions.js",
"publish:actions-release": "npm run prepare:package && npm run build:packages && npm run publish:npm"
},