File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515permissions :
1616 contents : write
17+ actions : write
1718
1819jobs :
1920 cherry-pick :
3839 run : |
3940 git push origin release/v${{ inputs.version }}
4041 echo "Successfully cherry-picked commit to release/v${{ inputs.version }}"
41- echo "Release-please will update the CHANGELOG PR automatically."
42+
43+ - name : Trigger Release Please
44+ env :
45+ GH_TOKEN : ${{ github.token }}
46+ run : |
47+ gh workflow run release-please.yml \
48+ --repo ${{ github.repository }} \
49+ -f version=${{ inputs.version }}
50+ echo "Triggered Release Please workflow for version ${{ inputs.version }}"
Original file line number Diff line number Diff line change 1414
1515permissions :
1616 contents : write
17+ actions : write
1718
1819jobs :
1920 cut-branch :
5859
5960 git commit -m "$COMMIT_MSG"
6061 git push origin "release/v${{ inputs.version }}"
62+
63+ - name : Trigger Release Please
64+ env :
65+ GH_TOKEN : ${{ github.token }}
66+ run : |
67+ gh workflow run release-please.yml \
68+ --repo ${{ github.repository }} \
69+ -f version=${{ inputs.version }}
70+ echo "Triggered Release Please workflow for version ${{ inputs.version }}"
Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - ' release/**'
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ description : ' Release version (e.g., 0.3.0)'
11+ required : true
12+ type : string
713
814permissions :
915 contents : write
@@ -13,18 +19,24 @@ jobs:
1319 release-please :
1420 runs-on : ubuntu-latest
1521 steps :
16- - name : Extract version from branch name
17- id : extract- version
22+ - name : Determine version
23+ id : version
1824 run : |
19- # Branch name is like "release/v0.3.0", extract "0.3.0"
20- VERSION="${GITHUB_REF_NAME#release/v}"
25+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
26+ VERSION="${{ inputs.version }}"
27+ BRANCH="release/v${{ inputs.version }}"
28+ else
29+ VERSION="${GITHUB_REF_NAME#release/v}"
30+ BRANCH="${GITHUB_REF_NAME}"
31+ fi
2132 echo "version=$VERSION" >> $GITHUB_OUTPUT
22- echo "Extracted version: $VERSION"
33+ echo "branch=$BRANCH" >> $GITHUB_OUTPUT
34+ echo "Version: $VERSION, Branch: $BRANCH"
2335
2436 - uses : googleapis/release-please-action@v4
2537 id : release
2638 with :
2739 config-file : .github/release-please-config.json
2840 manifest-file : .github/.release-please-manifest.json
29- target-branch : ${{ github.ref_name }}
30- release-as : ${{ steps.extract- version.outputs.version }}
41+ target-branch : ${{ steps.version.outputs.branch }}
42+ release-as : ${{ steps.version.outputs.version }}
You can’t perform that action at this time.
0 commit comments