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
11 changes: 10 additions & 1 deletion .github/workflows/cherry-pick-to-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

permissions:
contents: write
actions: write

jobs:
cherry-pick:
Expand All @@ -38,4 +39,12 @@ jobs:
run: |
git push origin release/v${{ inputs.version }}
echo "Successfully cherry-picked commit to release/v${{ inputs.version }}"
echo "Release-please will update the CHANGELOG PR automatically."

- name: Trigger Release Please
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run release-please.yml \
--repo ${{ github.repository }} \
-f version=${{ inputs.version }}
echo "Triggered Release Please workflow for version ${{ inputs.version }}"
10 changes: 10 additions & 0 deletions .github/workflows/cut-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

permissions:
contents: write
actions: write

jobs:
cut-branch:
Expand Down Expand Up @@ -58,3 +59,12 @@ jobs:

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

- name: Trigger Release Please
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run release-please.yml \
--repo ${{ github.repository }} \
-f version=${{ inputs.version }}
echo "Triggered Release Please workflow for version ${{ inputs.version }}"
26 changes: 19 additions & 7 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
branches:
- 'release/**'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 0.3.0)'
required: true
type: string

permissions:
contents: write
Expand All @@ -13,18 +19,24 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Extract version from branch name
id: extract-version
- name: Determine version
id: version
run: |
# Branch name is like "release/v0.3.0", extract "0.3.0"
VERSION="${GITHUB_REF_NAME#release/v}"
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION="${{ inputs.version }}"
BRANCH="release/v${{ inputs.version }}"
else
VERSION="${GITHUB_REF_NAME#release/v}"
BRANCH="${GITHUB_REF_NAME}"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
echo "Version: $VERSION, Branch: $BRANCH"

- 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: ${{ github.ref_name }}
release-as: ${{ steps.extract-version.outputs.version }}
target-branch: ${{ steps.version.outputs.branch }}
release-as: ${{ steps.version.outputs.version }}