Skip to content

Commit c901634

Browse files
fix: allow empty commit when preparing release PR (#733)
When the version in pyproject.toml already matches the requested release version, sed makes no change and `git commit` fails with "nothing to commit". Add --allow-empty so the release branch/PR is still created. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ceec285 commit c901634

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/create_release_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
sed -i 's/version\ =\ "[0-9]\+\.[0-9]\+\.[0-9]\+"/version\ =\ "${{ github.event.inputs.versionName }}"/g' pyproject.toml
3939
git add pyproject.toml
40-
git commit -S --message "Prepare release ${{ github.event.inputs.versionName }}"
40+
git commit -S --allow-empty --message "Prepare release ${{ github.event.inputs.versionName }}"
4141
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
4242
git push origin release/${{ github.event.inputs.versionName }}
4343

0 commit comments

Comments
 (0)