This commit is contained in:
mkorwel
2025-07-04 00:42:46 -07:00
parent 2e0c70b1a1
commit 098f9bdf79

View File

@@ -93,58 +93,27 @@ jobs:
git switch -c $BRANCH_NAME
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
- name: Update package versions for stable release
if: steps.version.outputs.NPM_TAG != 'nightly'
- name: Update package versions
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"
git add package.json package-lock.json packages/*/package.json
if ! git diff-index --quiet HEAD --; then
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
git commit -m "chore(release): ${{ steps.version.outputs.RELEASE_TAG }}"
git push --set-upstream origin ${{ steps.release_branch.outputs.BRANCH_NAME }} --follow-tags
- name: Create GitHub Release and Tag
if: '!inputs.dry_run'
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 "$TARGET_COMMITISH" \
--target "$RELEASE_BRANCH" \
--title "Release ${{ steps.version.outputs.RELEASE_TAG }}" \
--generate-notes