Skip to content

Commit 36a208d

Browse files
authored
Merge branch 'main' into fix/output-key-text-accumulation
2 parents 5f71d42 + 99087ba commit 36a208d

33 files changed

Lines changed: 341 additions & 200 deletions

.github/workflows/release-v2-cherry-pick.yml renamed to .github/workflows/release-v1-cherry-pick.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Step 3 (v2, optional): Cherry-picks a commit from v2 to the release/v2-candidate branch.
1+
# Step 3 (v1, optional): Cherry-picks a commit from v1 to the release/v1-candidate branch.
22
# Use between step 1 and step 4 to include bug fixes in an in-progress release.
33
# Note: Does NOT auto-trigger release-please to preserve manual changelog edits.
4-
name: "Release v2: Cherry-pick"
4+
name: "Release v1: Cherry-pick"
55

66
on:
77
workflow_dispatch:
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v6
2222
with:
23-
ref: release/v2-candidate
23+
ref: release/v1-candidate
2424
fetch-depth: 0
2525

2626
- name: Configure git
@@ -30,14 +30,14 @@ jobs:
3030
3131
- name: Cherry-pick commit
3232
run: |
33-
echo "Cherry-picking ${INPUTS_COMMIT_SHA} to release/v2-candidate"
33+
echo "Cherry-picking ${INPUTS_COMMIT_SHA} to release/v1-candidate"
3434
git cherry-pick ${INPUTS_COMMIT_SHA}
3535
env:
3636
INPUTS_COMMIT_SHA: ${{ inputs.commit_sha }}
3737

3838
- name: Push changes
3939
run: |
40-
git push origin release/v2-candidate
41-
echo "Successfully cherry-picked commit to release/v2-candidate"
40+
git push origin release/v1-candidate
41+
echo "Successfully cherry-picked commit to release/v1-candidate"
4242
echo "Note: Release Please is NOT auto-triggered to preserve manual changelog edits."
43-
echo "Run release-v2-please.yml manually if you want to regenerate the changelog."
43+
echo "Run release-v1-please.yml manually if you want to regenerate the changelog."
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Step 1 (v1): Starts the v1 release process by creating a release/v1-candidate branch.
2+
# Generates a changelog PR for review (step 2).
3+
name: "Release v1: Cut"
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
commit_sha:
9+
description: 'Commit SHA to cut from (leave empty for latest v1)'
10+
required: false
11+
type: string
12+
13+
permissions:
14+
contents: write
15+
actions: write
16+
17+
jobs:
18+
cut-release:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
with:
23+
ref: ${{ inputs.commit_sha || 'v1' }}
24+
25+
- name: Check for existing release/v1-candidate branch
26+
env:
27+
GH_TOKEN: ${{ github.token }}
28+
run: |
29+
if git ls-remote --exit-code --heads origin release/v1-candidate &>/dev/null; then
30+
echo "Error: release/v1-candidate branch already exists"
31+
echo "Please finalize or delete the existing release candidate before starting a new one"
32+
exit 1
33+
fi
34+
35+
- name: Create and push release/v1-candidate branch
36+
run: |
37+
git checkout -b release/v1-candidate
38+
git push origin release/v1-candidate
39+
echo "Created branch: release/v1-candidate"
40+
41+
- name: Trigger Release Please
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
run: |
45+
gh workflow run release-v1-please.yml --repo ${{ github.repository }} --ref release/v1-candidate
46+
echo "Triggered Release Please workflow for v1"
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Step 4 (v2): Triggers when the changelog PR is merged to release/v2-candidate.
2-
# Records last-release-sha and renames release/v2-candidate to release/v{version}.
3-
name: "Release v2: Finalize"
1+
# Step 4 (v1): Triggers when the changelog PR is merged to release/v1-candidate.
2+
# Records last-release-sha and renames release/v1-candidate to release/v{version}.
3+
name: "Release v1: Finalize"
44

55
on:
66
pull_request:
77
types: [closed]
88
branches:
9-
- release/v2-candidate
9+
- release/v1-candidate
1010

1111
permissions:
1212
contents: write
@@ -32,15 +32,15 @@ jobs:
3232
- uses: actions/checkout@v6
3333
if: steps.check.outputs.is_release_pr == 'true'
3434
with:
35-
ref: release/v2-candidate
35+
ref: release/v1-candidate
3636
token: ${{ secrets.RELEASE_PAT }}
3737
fetch-depth: 0
3838

3939
- name: Extract version from manifest
4040
if: steps.check.outputs.is_release_pr == 'true'
4141
id: version
4242
run: |
43-
VERSION=$(jq -r '.["."]' .github/.release-please-manifest-v2.json)
43+
VERSION=$(jq -r '.["."]' .github/.release-please-manifest-v1.json)
4444
echo "version=$VERSION" >> $GITHUB_OUTPUT
4545
echo "Extracted version: $VERSION"
4646
@@ -56,21 +56,21 @@ jobs:
5656
- name: Record last-release-sha for release-please
5757
if: steps.check.outputs.is_release_pr == 'true'
5858
run: |
59-
git fetch origin v2
60-
CUT_SHA=$(git merge-base origin/v2 HEAD)
61-
echo "Release was cut from v2 at: $CUT_SHA"
59+
git fetch origin v1
60+
CUT_SHA=$(git merge-base origin/v1 HEAD)
61+
echo "Release was cut from v1 at: $CUT_SHA"
6262
jq --arg sha "$CUT_SHA" '. + {"last-release-sha": $sha}' \
63-
.github/release-please-config-v2.json > tmp.json && mv tmp.json .github/release-please-config-v2.json
64-
git add .github/release-please-config-v2.json
65-
git commit -m "chore: update last-release-sha for next v2 release"
66-
git push origin release/v2-candidate
63+
.github/release-please-config-v1.json > tmp.json && mv tmp.json .github/release-please-config-v1.json
64+
git add .github/release-please-config-v1.json
65+
git commit -m "chore: update last-release-sha for next v1 release"
66+
git push origin release/v1-candidate
6767
68-
- name: Rename release/v2-candidate to release/v{version}
68+
- name: Rename release/v1-candidate to release/v{version}
6969
if: steps.check.outputs.is_release_pr == 'true'
7070
run: |
7171
VERSION="v${STEPS_VERSION_OUTPUTS_VERSION}"
72-
git push origin "release/v2-candidate:refs/heads/release/$VERSION" ":release/v2-candidate"
73-
echo "Renamed release/v2-candidate to release/$VERSION"
72+
git push origin "release/v1-candidate:refs/heads/release/$VERSION" ":release/v1-candidate"
73+
echo "Renamed release/v1-candidate to release/$VERSION"
7474
env:
7575
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
7676

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Runs release-please to create/update a PR with version bump and changelog for v2.
2-
# Triggered only by workflow_dispatch (from release-v2-cut.yml).
1+
# Runs release-please to create/update a PR with version bump and changelog for v1.
2+
# Triggered only by workflow_dispatch (from release-v1-cut.yml).
33
# Does NOT auto-run on push to preserve manual changelog edits after cherry-picks.
4-
name: "Release v2: Please"
4+
name: "Release v1: Please"
55

66
on:
7-
# Only run via workflow_dispatch (triggered by release-v2-cut.yml)
7+
# Only run via workflow_dispatch (triggered by release-v1-cut.yml)
88
workflow_dispatch:
99

1010
permissions:
@@ -15,27 +15,27 @@ jobs:
1515
release-please:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Check if release/v2-candidate still exists
18+
- name: Check if release/v1-candidate still exists
1919
id: check
2020
env:
2121
GH_TOKEN: ${{ github.token }}
2222
run: |
23-
if gh api repos/${{ github.repository }}/branches/release/v2-candidate --silent 2>/dev/null; then
23+
if gh api repos/${{ github.repository }}/branches/release/v1-candidate --silent 2>/dev/null; then
2424
echo "exists=true" >> $GITHUB_OUTPUT
2525
else
26-
echo "release/v2-candidate branch no longer exists, skipping"
26+
echo "release/v1-candidate branch no longer exists, skipping"
2727
echo "exists=false" >> $GITHUB_OUTPUT
2828
fi
2929
3030
- uses: actions/checkout@v6
3131
if: steps.check.outputs.exists == 'true'
3232
with:
33-
ref: release/v2-candidate
33+
ref: release/v1-candidate
3434

3535
- uses: googleapis/release-please-action@v4
3636
if: steps.check.outputs.exists == 'true'
3737
with:
3838
token: ${{ secrets.RELEASE_PAT }}
39-
config-file: .github/release-please-config-v2.json
40-
manifest-file: .github/.release-please-manifest-v2.json
41-
target-branch: release/v2-candidate
39+
config-file: .github/release-please-config-v1.json
40+
manifest-file: .github/.release-please-manifest-v1.json
41+
target-branch: release/v1-candidate
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Step 6 (v2): Builds and publishes the v2 package to PyPI from a release/v{version} branch.
2-
# Reads version from .release-please-manifest-v2.json, converts to PEP 440,
1+
# Step 6 (v1): Builds and publishes the v1 package to PyPI from a release/v{version} branch.
2+
# Reads version from .release-please-manifest-v1.json, converts to PEP 440,
33
# updates version.py, then builds and publishes.
4-
# Creates a merge-back PR (step 7) to sync release changes to v2.
5-
name: "Release v2: Publish to PyPi"
4+
# Creates a merge-back PR (step 7) to sync release changes to v1.
5+
name: "Release v1: Publish to PyPi"
66

77
on:
88
workflow_dispatch:
@@ -18,7 +18,7 @@ jobs:
1818
- name: Validate branch
1919
run: |
2020
if [[ ! "${GITHUB_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
21-
echo "Error: Must run from a release/v* branch (e.g., release/v2.0.0-alpha.2)"
21+
echo "Error: Must run from a release/v* branch (e.g., release/v1.34.1)"
2222
exit 1
2323
fi
2424
@@ -27,15 +27,15 @@ jobs:
2727
- name: Extract version from manifest and convert to PEP 440
2828
id: version
2929
run: |
30-
VERSION=$(jq -r '.["."]' .github/.release-please-manifest-v2.json)
30+
VERSION=$(jq -r '.["."]' .github/.release-please-manifest-v1.json)
3131
echo "semver=$VERSION" >> $GITHUB_OUTPUT
3232
echo "Semver version: $VERSION"
3333
3434
# Convert semver pre-release to PEP 440:
35-
# 2.0.0-alpha.1 -> 2.0.0a1
36-
# 2.0.0-beta.1 -> 2.0.0b1
37-
# 2.0.0-rc.1 -> 2.0.0rc1
38-
# 2.0.0 -> 2.0.0 (no change for stable)
35+
# 1.35.0-alpha.1 -> 1.35.0a1
36+
# 1.35.0-beta.1 -> 1.35.0b1
37+
# 1.35.0-rc.1 -> 1.35.0rc1
38+
# 1.35.0 -> 1.35.0 (no change for stable)
3939
PEP440=$(echo "$VERSION" | sed -E 's/-alpha\./a/; s/-beta\./b/; s/-rc\./rc/')
4040
echo "pep440=$PEP440" >> $GITHUB_OUTPUT
4141
echo "PEP 440 version: $PEP440"
@@ -73,7 +73,7 @@ jobs:
7373
PEP440_VERSION: ${{ steps.version.outputs.pep440 }}
7474
run: |
7575
gh pr create \
76-
--base v2 \
76+
--base v1 \
7777
--head "${GITHUB_REF_NAME}" \
78-
--title "chore: merge release v${PEP440_VERSION} to v2" \
79-
--body "Syncs version bump and CHANGELOG from release v${SEMVER_VERSION} to v2."
78+
--title "chore: merge release v${PEP440_VERSION} to v1" \
79+
--body "Syncs version bump and CHANGELOG from release v${SEMVER_VERSION} to v1."

.github/workflows/release-v2-cut.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/upload-adk-docs-to-vertex-ai-search.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ jobs:
5151
GCS_BUCKET_NAME: ${{ secrets.GCS_BUCKET_NAME }}
5252
ADK_DOCS_ROOT_PATH: /tmp/adk-docs
5353
ADK_PYTHON_ROOT_PATH: /tmp/adk-python
54-
PYTHONPATH: contributing/samples/adk_team
54+
PYTHONPATH: ${{ github.workspace }}/contributing/samples/adk_team
5555
run: python -m adk_answering_agent.upload_docs_to_vertex_ai_search

.github/workflows/v2-sync.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)