You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
710d9de011
* use last-release-sha to locate the previous release commit in main for CHANGELOG generating. * release tag can now use the commit sha in release branch Co-authored-by: Wei Sun (Jack) <weisun@google.com> PiperOrigin-RevId: 871909085
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
# 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"
|