Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
85434e2
feat: Pass event id as a metadata when it is converted into a message
reniowood Jan 26, 2026
553e376
feat: Remove overall_eval_status calculation from _CustomMetricEvalua…
jcpagadora737 Jan 26, 2026
43d6075
feat: allow Vertex AI Client initialization with API Key
ankursharmas Jan 26, 2026
1063fa5
fix: Reload the stale session in database_session_service when the up…
DeanChensj Jan 26, 2026
c34615e
fix: disable save_input_blobs_as_artifacts deprecation warning messag…
google-genai-bot Jan 27, 2026
3bcd8f7
fix: EscapieClick’s Wrapping in adk eval help (#4258)
ftnext Jan 27, 2026
2155a35
docs: Update ADK release analyzer to use Gemini 3 Pro with retry and …
xuanyang15 Jan 27, 2026
4ee125a
feat: Add interface for agent optimizers
KPJoshi Jan 27, 2026
65cbf4b
fix: Make OpenAPI /docs path work again
wuliang229 Jan 27, 2026
3480b3b
feat: improve error message when failing to get tools from MCP
google-genai-bot Jan 27, 2026
8f7d965
feat: Add methods in MCPToolset for users to access MCP resources (re…
wukath Jan 27, 2026
a16e3cc
fix: Fix cases where execution_result_delimiters have None type eleme…
google-genai-bot Jan 28, 2026
32f9f92
chore: Add GitHub Action check to run mypy
sararob Jan 28, 2026
4341839
chore: Convert MCPToolset to McpToolset in unittests
wukath Jan 29, 2026
381d44c
feat: Add get_auth_config method to toolset to expose auth requiremen…
seanzhougoogle Jan 29, 2026
ecce7e5
fix: Change MCP read_resource to return the original contents
wukath Jan 29, 2026
288c2c4
chore: Add ADK logger in RestApiTool
xuanyang15 Jan 29, 2026
c0c98d9
test: Ensure BigQueryAgentAnalyticsPlugin is shut down after each test
google-genai-bot Jan 30, 2026
585ebfd
feat: Support dynamic config for VertexAiSearchTool
xuanyang15 Jan 30, 2026
00aba2d
feat: Improve asyncio loop handling and test cleanup
google-genai-bot Jan 30, 2026
2ac468e
fix: Add pre-deployment validation for agent module imports
GWeale Jan 30, 2026
47221cd
fix: Handle HTTP/HTTPS URLs for media files in LiteLLM content conver…
GWeale Jan 30, 2026
63a8eba
fix: Ensure database sessions are always rolled back on errors
wuliang229 Jan 30, 2026
d0102ec
fix: Recognize function responses as non-empty parts in LiteLLM
GWeale Jan 30, 2026
798d005
fix: Stream errors as simple JSON objects in ADK web server SSE
GWeale Jan 31, 2026
fe82f3c
fix!: Make credential manager to accept tool_context instead of callb…
seanzhougoogle Jan 31, 2026
ee873ca
feat(auth): Add framework support for toolset authentication before g…
seanzhougoogle Jan 31, 2026
798f65d
feat(tools): Implement toolset auth for McpToolset, OpenAPIToolset, a…
seanzhougoogle Feb 1, 2026
131fbd3
fix: Fix Pydantic Schema Generation Error for ClientSession
seanzhougoogle Feb 1, 2026
2770012
chore: Add sample agent that need to go through oauth flow during mcp…
seanzhougoogle Feb 2, 2026
9290b96
feat: Make OpenAPI tool async
condorcet Feb 2, 2026
7d58e0d
feat: Mark Vertex calls made from non-gemini models
google-genai-bot Feb 2, 2026
e87a843
feat(otel): add extra attributes to span generated with `opentelemetr…
RKest Feb 2, 2026
dd8cd27
chore: Replace print statements with logging in ADK
GWeale Feb 3, 2026
666cebe
fix: Add update_timestamp_tz property to StorageSession
GWeale Feb 3, 2026
33012e6
fix: Make credential key generation stable and prevent cross-user cre…
GWeale Feb 3, 2026
f82ceb0
chore: Replace proxy methods with utils implementation
google-genai-bot Feb 3, 2026
6ff10b2
chore: Replace proxy methods with utils implementation
google-genai-bot Feb 3, 2026
125bc85
fix: Resolving MutualTLSChannelError 'OpenSSL' module error on by add…
google-genai-bot Feb 3, 2026
da73e71
fix: Enable pool_pre_ping by default for non-SQLite database engines
GWeale Feb 3, 2026
706a6dd
fix: Update OpenTelemetry dependency versions
GWeale Feb 3, 2026
ce07cd8
fix(cli): ignore session_db_kwargs for sqlite session services
wuliang229 Feb 3, 2026
574ec43
chore: Improve error handling for LiteLlm import in gemma_llm.py
GWeale Feb 3, 2026
004e15c
feat: Allow passthrough of GOOGLE_CLOUD_LOCATION for AgentEngine depl…
yeesian Feb 3, 2026
37e6507
chore: update adk_web, re-work events, and adding A2UI capabilities
wyf7107 Feb 3, 2026
2220d88
fix: Check `will_continue` for streaming function calls
xuanyang15 Feb 3, 2026
1de65cf
No public description
google-genai-bot Feb 4, 2026
f90adff
fix: Add query parameters to /run_live for advanced run configurations
GWeale Feb 4, 2026
3c63c2a
fix(docs): fix grammar and remove duplicate words in documentation an…
88448844 Feb 4, 2026
ac1401b
fix: Escape Click’s Wrapping in bulled lists of `adk web` options
ftnext Feb 4, 2026
7deffb1
fix: pass tool context into require_confirmation function in McpTool
wukath Feb 4, 2026
de44bbc
chore: update adk web
wyf7107 Feb 5, 2026
fb941f9
chore(version): Bump version and update changelog for 1.24.0
Jacksunwei Feb 5, 2026
e752bbb
chore: Remove unused tzlocal dependency and logging
wuliang229 Feb 5, 2026
a08bf62
feat(otel): add extra attributes to span generated with `opentelemetr…
google-genai-bot Feb 5, 2026
9b112e2
fix: Refactor context filtering to better handle multi-turn invocations
GWeale Feb 5, 2026
adbc37f
feat: Add progress_callback support to MCPTool and MCPToolset
xuanyang15 Feb 5, 2026
bb89466
chore: Improve type hints and handle None values in ADK utils
GWeale Feb 5, 2026
ae993e8
fix: adding back deprecated eval endpoint for web until we migrate
wyf7107 Feb 5, 2026
3686a3a
chore: update adk web files, updated eval dialog colors, and fixed a2…
wyf7107 Feb 5, 2026
6645aa0
feat: Add experimental agent tool simulator
google-genai-bot Feb 5, 2026
93a085a
chore(version): Bumps version to 1.24.1 patch
Jacksunwei Feb 5, 2026
d9e8e9c
fix: otel_to_cloud flag help text points at Cloud Run instead of Agen…
jawoszek Feb 5, 2026
781f605
feat: add base_url option to Gemini LLM class
matthewchan-g Feb 5, 2026
0b9cbd2
feat: Add experimental agent tool simulator
google-genai-bot Feb 6, 2026
483c5ba
ADK changes
google-genai-bot Feb 6, 2026
c736210
feat: Add models.py and prompt.py to adk/skills to use in skill toolset
wukath Feb 6, 2026
e25227d
feat: Add a load MCP resource tool
wukath Feb 6, 2026
a2e43aa
chore(version): Limits sphinx under 9 for docs
Jacksunwei Feb 6, 2026
6bc70a6
fix(mcp): used logger to log instead of print
DineshThumma9 Feb 9, 2026
fd8a9e3
fix: Handle list values in Gemini schema sanitization
GWeale Feb 9, 2026
0758f87
chore: remove bare excepts
GWeale Feb 9, 2026
64a44c2
fix: Migrate VertexAiMemoryBankService to use the async Vertex AI client
GWeale Feb 9, 2026
663cb75
fix: Conditionally preserve function call IDs in LLM requests
GWeale Feb 9, 2026
d2dba27
fix: Pass invocation_id from /run endpoint to Runner.run_async
GWeale Feb 9, 2026
43c437e
feat(conformance): add report generation to `adk conformance test` co…
wuliang229 Feb 9, 2026
32ee07d
fix: prompt token may be None in streaming mode
wsa-2002 Feb 9, 2026
f508474
fix: Per-session locking and row-level locking in `DatabaseSessionSer…
GWeale Feb 9, 2026
8d02792
feat: Add SkillToolset to adk
wukath Feb 9, 2026
19b6076
fix: Strip timezone for PostgreSQL timestamps in DatabaseSessionService
filipecaixeta Feb 9, 2026
ec660ed
chore: Add experimental tag to SkillToolset
wukath Feb 10, 2026
7c7d25a
fix: Support escaped curly braces in instruction templates
GWeale Feb 10, 2026
e0b9712
fix: Add endpoints to get/list artifact version metadata
sarojrout Feb 10, 2026
80ff067
docs: fixing typo in multiple files
didier-durand Feb 10, 2026
de79bf1
feat: log exception details before re-raising in MCP session execution
google-genai-bot Feb 10, 2026
59e8897
feat: add add_events_to_memory facade for event-delta
GWeale Feb 10, 2026
f5702d7
ci: Upgrade GitHub Actions to latest versions
salmanmkc Feb 10, 2026
2f0fe97
ci: Upgrade GitHub Actions for Node 24 compatibility
salmanmkc Feb 10, 2026
25ec2c6
feat(web): Add /health and /version endpoints to ADK web server
wuliang229 Feb 10, 2026
a88e864
fix: Add post-invocation token-threshold compaction with event retention
GWeale Feb 10, 2026
6ee5126
docs: fixing a typo
didier-durand Feb 10, 2026
e6da417
fix: propagate grounding and citation metadata in streaming responses
sasha-gitg Feb 10, 2026
7af1858
feat: Update agent simulator by improving prompts and add environment…
google-genai-bot Feb 10, 2026
2010569
fix: Preserve thought_signature in function call conversions for inte…
xuanyang15 Feb 10, 2026
40c15d0
feat(cli): Add `--auto_create_session` flag to `adk api_server` CLI
ekimcodes Feb 11, 2026
0abf4cd
feat: Add a demo simple prompt optimizer for the optimization interface
google-genai-bot Feb 11, 2026
7110336
refactor: Replace check of instance for LlmAgent with hasAttribute check
seanzhougoogle Feb 11, 2026
4aa4751
fix: Fix event loop closed bug in McpSessionManager
wukath Feb 11, 2026
3cf43e3
feat: Enhance google credentials config to support externally passed …
google-genai-bot Feb 11, 2026
758d337
fix(sessions): use async iteration for VertexAiSessionService.list_se…
anmolg1997 Feb 11, 2026
61c329f
ci: match the environment with internal ones for pyink/isort/unittest
wuliang229 Feb 11, 2026
657acfa
docs: Add PostgreSQL session storage sample and documentation
hiroakis Feb 11, 2026
38b4869
chore(ci): migrate release pipeline from release-please App to GitHub…
Jacksunwei Feb 11, 2026
9dccd6a
feat(conformance): read report's version info from the server
wuliang229 Feb 11, 2026
bcbfeba
feat: pass trace context in MCP tool call's _meta field with Otel pro…
leonzz Feb 11, 2026
34da2d5
feat: enable dependency injection for agent loader in FastAPI app gen
google-genai-bot Feb 11, 2026
079f7a3
fix: Support escaped curly braces in instruction templates
GWeale Feb 11, 2026
8cd22fb
chore(version): Bump version and update changelog for 1.25.0
wyf7107 Feb 11, 2026
b7f9110
chore: Introduce a unified Context
xuanyang15 Feb 12, 2026
9f7d5b3
feat: Add load_skill_from_dir() method
wukath Feb 12, 2026
845818b
ci: only use `--extra test` for unit tests
wuliang229 Feb 12, 2026
4000c02
chore: remove `scipy` from eval dependencies
wuliang229 Feb 12, 2026
c6b1c74
docs: add `thinking_config` in `generate_content_config` in example a…
wuliang229 Feb 12, 2026
d85932f
chore: Add X-Goog-API-Client header to GDA API requests
google-genai-bot Feb 12, 2026
9562cd6
chore: expose an endpoint for detailed app info
wyf7107 Feb 12, 2026
4f71b45
chore: Add LiteLLM streaming sample
GWeale Feb 12, 2026
647d3b1
chore: Unify CallbackContext and ToolContext into the Context class
xuanyang15 Feb 12, 2026
b53bc55
fix: Only relay the LiveRequest after tools is invoked
seanzhougoogle Feb 12, 2026
5269a6b
chore: Register all streaming tool at runner
seanzhougoogle Feb 13, 2026
ede925b
chore: Lazy register all streaming tools
seanzhougoogle Feb 13, 2026
30b2ed3
fix(web): allow session resume without new message
Akshat8510 Feb 13, 2026
556d148
chore: Add readme in skills folder to flag that it is experimental
wukath Feb 13, 2026
186371f
chore: Export Context class
xuanyang15 Feb 13, 2026
fbe9ecc
fix: race condition in table creation for `DatabaseSessionService`
wuliang229 Feb 13, 2026
d5332f4
feat: Expand LiteLlm supported models and add registry tests
anmolg1997 Feb 13, 2026
811e50a
feat: add generate/create modes for Vertex AI Memory Bank writes
GWeale Feb 13, 2026
1d4b0f9
chore: Replace isinstance call with hasattr call
seanzhougoogle Feb 13, 2026
d56cb41
fix: Check both `input_stream` parameter name and its annotation to d…
seanzhougoogle Feb 14, 2026
3fbc27f
fix: handle UnicodeDecodeError when loading skills in ADK
google-genai-bot Feb 14, 2026
21be6ad
feat: Make skill instruction optimizable and can adapt to user tasks
cornellgit Feb 14, 2026
fc1f1db
fix(skill)!: coloate default skill SI with skilltoolset
cornellgit Feb 14, 2026
4e2d615
fix: Fix pickling lock errors in McpSessionManager
wukath Feb 17, 2026
706f9fe
refactor: Extract reusable private methods
seanzhougoogle Feb 17, 2026
42eeaef
refactor: Extract reusable private methods
google-genai-bot Feb 17, 2026
976a238
refactor: Extract reusable private methods
seanzhougoogle Feb 17, 2026
6a808c6
feat: Introduce User Personas to the ADK evaluation framework
google-genai-bot Feb 17, 2026
ea03487
fix: Improve BigQuery Agent Analytics plugin reliability and code qua…
haiyuan-eng-google Feb 17, 2026
4285f85
fix: Include list of skills in every message and remove list_skills t…
wukath Feb 17, 2026
e1e0d63
refactor: Extract reusable function for building agent transfer instr…
seanzhougoogle Feb 17, 2026
2703613
fix: Replace the global DEFAULT_USER_PERSONA_REGISTRY with a function…
google-genai-bot Feb 17, 2026
dbd6420
fix(deps): Increase pydantic lower version to 2.7.0
Jacksunwei Feb 17, 2026
6a53f41
chore: set a maximum number of rows for BigQuery query results in the…
google-genai-bot Feb 18, 2026
33f7d11
feat(auth): Add native support for id_token in OAuth2 credentials
google-genai-bot Feb 18, 2026
710d9de
chore(release): Update release process to allow tag to use accurate c…
Jacksunwei Feb 18, 2026
eccdf6d
fix: Remove experimental decorators from user persona data models
google-genai-bot Feb 18, 2026
2d8b6a2
chore: Release 1.25.1
seanzhougoogle Feb 18, 2026
f27a9cf
fix: Expand add_memory to accept MemoryEntry
GWeale Feb 19, 2026
eaf50ce
chore: provide a way to disable model check for builtin tools
GWeale Feb 19, 2026
4a88804
feat: Add support for memory consolidation via Vertex AI Memory Bank
GWeale Feb 19, 2026
a39ca94
chore: Add sqlite_span_exporter for .adk folder traces
GWeale Feb 20, 2026
bef3f11
feat: Bigquery ADK support for search catalog tool
sahaajaaa Feb 20, 2026
7478bda
fix: Parallelize tool resolution in LlmAgent.canonical_tools()
wukath Feb 20, 2026
e6b601a
fix: Invoke on_tool_error_callback for missing tools in live mode
GWeale Feb 20, 2026
a7b5097
feat: Use --memory_service_uri in ADK CLI run command
GWeale Feb 20, 2026
09ee3c3
ADK changes
google-genai-bot Feb 20, 2026
9c4c445
feat: Add /chat/completions integration to ApigeeLlm
google-genai-bot Feb 20, 2026
77df6d8
ci: only keep `--extra test` in GitHub unit test workflow
wuliang229 Feb 20, 2026
abaa929
feat: Agent Registry in ADK
wukath Feb 20, 2026
bbdf0ea
chore: Update OpenTelemetry dependency upper bounds
GWeale Feb 20, 2026
485fcb8
feat: Add intra-invocation compaction and token compaction pre-request
GWeale Feb 20, 2026
6ea3696
chore: Migrate /agents to use the new feature decorator
xuanyang15 Feb 20, 2026
e8019b1
fix: Refactor LiteLLM streaming response parsing for compatibility wi…
GWeale Feb 20, 2026
4260ef0
feat: Add schema auto-upgrade, tool provenance, HITL tracing, and spa…
haiyuan-eng-google Feb 21, 2026
223d9a7
feat: Agent Skills spec compliance — validation, aliases, scripts, an…
haiyuan-eng-google Feb 21, 2026
7557a92
feat: change default BigQuery table ID and update docstring
haiyuan-eng-google Feb 22, 2026
87fcd77
feat: Add interceptor framework to A2aAgentExecutor
google-genai-bot Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.25.1"
}
25 changes: 25 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "9f7d5b3f1476234e552b783415527cc4bac55b39",
"packages": {
".": {
"release-type": "python",
"package-name": "google-adk",
"include-component-in-tag": false,
"skip-github-release": true,
"changelog-path": "CHANGELOG.md",
"changelog-sections": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "perf", "section": "Performance Improvements"},
{"type": "refactor", "section": "Code Refactoring"},
{"type": "docs", "section": "Documentation"},
{"type": "test", "section": "Tests", "hidden": true},
{"type": "build", "section": "Build System", "hidden": true},
{"type": "ci", "section": "CI/CD", "hidden": true},
{"type": "style", "section": "Styles", "hidden": true},
{"type": "chore", "section": "Miscellaneous Chores", "hidden": true}
]
}
}
}
5 changes: 0 additions & 5 deletions .github/release-please.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/release-trigger.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python-version: '3.11'

- name: Load adk-bot SSH Private Key
uses: webfactory/ssh-agent@v0.9.0
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.ADK_BOT_SSH_PRIVATE_KEY }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/isort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
python-version: '3.11'

- name: Install isort
run: |
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/mypy-new-errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Mypy New Error Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]


jobs:
mypy-diff:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13',]
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Generate Baseline (Main)
run: |
# Switch to main branch to generate baseline
git checkout origin/main

git checkout ${{ github.sha }} -- pyproject.toml

# Install dependencies for main
uv venv .venv
source .venv/bin/activate
uv sync --all-extras

# Run mypy, filter for errors only, remove line numbers (file:123: -> file::), and sort
# We ignore exit code (|| true) because we expect errors on main
uv run mypy . | grep "error:" | sed 's/:\([0-9]\+\):/::/g' | sort > main_errors.txt || true

echo "Found $(wc -l < main_errors.txt) errors on main."

- name: Check PR Branch
run: |
# Switch back to the PR commit
git checkout ${{ github.sha }}

# Re-sync dependencies in case the PR changed them
source .venv/bin/activate
uv sync --all-extras

# Run mypy on PR code, apply same processing
uv run mypy . | grep "error:" | sed 's/:\([0-9]\+\):/::/g' | sort > pr_errors.txt || true

echo "Found $(wc -l < pr_errors.txt) errors on PR branch."

- name: Compare and Fail on New Errors
run: |
# 'comm -13' suppresses unique lines in file1 (main) and common lines,
# leaving only lines unique to file2 (PR) -> The new errors.
comm -13 main_errors.txt pr_errors.txt > new_errors.txt

if [ -s new_errors.txt ]; then
echo "::error::The following NEW mypy errors were introduced:"
cat new_errors.txt
exit 1
else
echo "Great job! No new mypy errors introduced."
fi
32 changes: 32 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mypy Type Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13',]

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras

- name: Run mypy

run: uv run mypy . --strict
2 changes: 1 addition & 1 deletion .github/workflows/pyink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
python-version: '3.11'

- name: Install pyink
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout code
Expand All @@ -37,13 +37,13 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7

- name: Install dependencies
run: |
uv venv .venv
source .venv/bin/activate
uv sync --extra test --extra eval --extra a2a
uv sync --extra test

- name: Run unit tests with pytest
run: |
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release-cherry-pick.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Step 3 (optional): Cherry-picks a commit from main to the release/candidate branch.
# Use between step 1 and step 4 to include bug fixes in an in-progress release.
name: "Release: Cherry-pick"

on:
workflow_dispatch:
inputs:
commit_sha:
description: 'Commit SHA to cherry-pick'
required: true
type: string

permissions:
contents: write
actions: write

jobs:
cherry-pick:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: release/candidate
fetch-depth: 0

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Cherry-pick commit
run: |
echo "Cherry-picking ${{ inputs.commit_sha }} to release/candidate"
git cherry-pick ${{ inputs.commit_sha }}

- name: Push changes
run: |
git push origin release/candidate
echo "Successfully cherry-picked commit to release/candidate"

- name: Trigger Release Please
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run release-please.yml --repo ${{ github.repository }} --ref release/candidate
echo "Triggered Release Please workflow"
46 changes: 46 additions & 0 deletions .github/workflows/release-cut.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Step 1: Starts the release process by creating a release/candidate branch.
# Generates a changelog PR for review (step 2).
name: "Release: Cut"

on:
workflow_dispatch:
inputs:
commit_sha:
description: 'Commit SHA to cut from (leave empty for latest main)'
required: false
type: string

permissions:
contents: write
actions: write

jobs:
cut-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.commit_sha || 'main' }}

- name: Check for existing release/candidate branch
env:
GH_TOKEN: ${{ github.token }}
run: |
if git ls-remote --exit-code --heads origin release/candidate &>/dev/null; then
echo "Error: release/candidate branch already exists"
echo "Please finalize or delete the existing release candidate before starting a new one"
exit 1
fi

- name: Create and push release/candidate branch
run: |
git checkout -b release/candidate
git push origin release/candidate
echo "Created branch: release/candidate"

- name: Trigger Release Please
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run release-please.yml --repo ${{ github.repository }} --ref release/candidate
echo "Triggered Release Please workflow"
83 changes: 83 additions & 0 deletions .github/workflows/release-finalize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Step 4: Triggers when the changelog PR is merged to release/candidate.
# Records last-release-sha and renames release/candidate to release/v{version}.
name: "Release: Finalize"

on:
pull_request:
types: [closed]
branches:
- release/candidate

permissions:
contents: write
pull-requests: write

jobs:
finalize:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Check for release-please PR
id: check
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
if echo "$LABELS" | grep -q "autorelease: pending"; then
echo "is_release_pr=true" >> $GITHUB_OUTPUT
else
echo "Not a release-please PR, skipping"
echo "is_release_pr=false" >> $GITHUB_OUTPUT
fi

- uses: actions/checkout@v4
if: steps.check.outputs.is_release_pr == 'true'
with:
ref: release/candidate
token: ${{ secrets.RELEASE_PAT }}
fetch-depth: 0

- name: Extract version from manifest
if: steps.check.outputs.is_release_pr == 'true'
id: version
run: |
VERSION=$(jq -r '.["."]' .github/.release-please-manifest.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

- name: Configure git identity from RELEASE_PAT
if: steps.check.outputs.is_release_pr == 'true'
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
run: |
USER_JSON=$(gh api user)
git config user.name "$(echo "$USER_JSON" | jq -r '.login')"
git config user.email "$(echo "$USER_JSON" | jq -r '.id')+$(echo "$USER_JSON" | jq -r '.login')@users.noreply.github.com"

- name: Record last-release-sha for release-please
if: steps.check.outputs.is_release_pr == 'true'
run: |
git fetch origin main
CUT_SHA=$(git merge-base origin/main HEAD)
echo "Release was cut from main at: $CUT_SHA"
jq --arg sha "$CUT_SHA" '. + {"last-release-sha": $sha}' \
.github/release-please-config.json > tmp.json && mv tmp.json .github/release-please-config.json
git add .github/release-please-config.json
git commit -m "chore: update last-release-sha for next release"
git push origin release/candidate

- name: Rename release/candidate to release/v{version}
if: steps.check.outputs.is_release_pr == 'true'
run: |
VERSION="v${{ steps.version.outputs.version }}"
git push origin "release/candidate:refs/heads/release/$VERSION" ":release/candidate"
echo "Renamed release/candidate to release/$VERSION"

- name: Update PR label to tagged
if: steps.check.outputs.is_release_pr == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr edit ${{ github.event.pull_request.number }} \
--remove-label "autorelease: pending" \
--add-label "autorelease: tagged"
echo "Updated PR label to autorelease: tagged"
Loading
Loading