Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/cut-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,13 @@ jobs:
exit 1
fi

- name: Create release branch
- name: Create and push release branch
run: |
BRANCH_NAME="release/v${{ inputs.version }}"
git checkout -b "$BRANCH_NAME"
git push origin "$BRANCH_NAME"
echo "Created branch: $BRANCH_NAME"

- name: Bump version
run: |
# Update version.py
sed -i 's/__version__ = ".*"/__version__ = "${{ inputs.version }}"/' src/google/adk_community/version.py

# Update release-please manifest
echo '{".": "${{ inputs.version }}"}' > .github/.release-please-manifest.json

echo "Bumped version to ${{ inputs.version }}"

- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/google/adk_community/version.py .github/.release-please-manifest.json
COMMIT_MSG="chore: bump version to ${{ inputs.version }}

To test this release:
uv pip install git+https://github.com/${{ github.repository }}.git@release/v${{ inputs.version }}"

git commit -m "$COMMIT_MSG"
git push origin "release/v${{ inputs.version }}"

- name: Trigger Release Please
env:
GH_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string

permissions:
contents: read
contents: write
pull-requests: write

jobs:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Determine version
id: version
- name: Determine version and branch
id: vars
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION="${{ inputs.version }}"
Expand All @@ -33,10 +33,19 @@ jobs:
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
echo "Version: $VERSION, Branch: $BRANCH"

- uses: actions/checkout@v4
with:
ref: ${{ steps.vars.outputs.branch }}

- name: Set release-as version
run: |
jq --arg version "${{ steps.vars.outputs.version }}" \
'.packages["."]["release-as"] = $version' \
.github/release-please-config.json > tmp.json && mv tmp.json .github/release-please-config.json

- uses: googleapis/release-please-action@v4
id: release
with:
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
target-branch: ${{ steps.version.outputs.branch }}
release-as: ${{ steps.version.outputs.version }}
target-branch: ${{ steps.vars.outputs.branch }}