1- name : Create bump commit on release branch
1+ name : Pre-release - Bump version & Draft Release
22on :
33 workflow_dispatch :
44 inputs :
5- releaseBranchVersion :
5+ target_branch :
66 description : >
7- "This workflow will create a PR to add a bump version commit on the release branch.
8- Enter the release branch version release/XX.Y.Z: "
7+ "This workflow will create a commit to bump version on a branch.
8+ Enter the target branch: main for Saas, or release/XX.Y for a LTS version: "
99 required : true
1010 type : string
11- default : " XX.Y.Z"
12- bumpCommitType :
13- description : " Choose the type of bump commit:"
14- required : true
15- type : choice
16- default : " minor"
17- options :
18- - major
19- - minor
20- - patch
11+ default : " main"
2112
2213jobs :
2314 create_bump_commit :
2415 runs-on : ubuntu-latest
2516 name : create bump commit PR
26-
2717 steps :
2818 - uses : actions/checkout@v4
2919 with :
30- ref : release/ ${{ github.event.inputs.releaseBranchVersion }}
20+ ref : ${{ github.event.inputs.target_branch }}
3121
3222 - name : Set up Python
3323 uses : actions/setup-python@v5
@@ -52,16 +42,10 @@ jobs:
5242 curl https://raw.githubusercontent.com/kili-technology/kili-python-sdk/main/.github/scripts/utils.sh --output utils.sh
5343 source ./utils.sh # to get the bump_version function
5444
55- # create PR branch
56- git checkout -b workflow/create-bump-commit-release-branch-${{ inputs.releaseBranchVersion }}-${{ github.run_id }}
57-
5845 # create bump commit
59- new_version=$(bump_version commit ${{ inputs.bumpCommitType }} )
46+ new_version=$(bump_version commit patch )
6047 echo "New version (bump_version): $new_version"
6148
62- # create PR
63- git push --quiet --set-upstream origin workflow/create-bump-commit-release-branch-${{ inputs.releaseBranchVersion }}-${{ github.run_id }}
64- gh pr create --base release/${{ inputs.releaseBranchVersion }} --title "chore: bump version to $new_version" --body "Bump version to $new_version on branch release/${{ inputs.releaseBranchVersion }}"
65-
49+ git push
6650 env :
6751 GH_TOKEN : ${{ github.token }} # needed for gh cli
0 commit comments