Skip to content

Commit 9d5ce0b

Browse files
committed
fix: handle pre-bumped version in release workflow
Skip the version bump commit if Cargo.toml already has the target version, avoiding a failure when the version was bumped manually before triggering the workflow.
1 parent 08c362a commit 9d5ce0b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050
git config user.name "github-actions[bot]"
5151
git config user.email "github-actions[bot]@users.noreply.github.com"
5252
git add Cargo.toml Cargo.lock
53-
git commit -m "chore: bump version to ${{ github.event.inputs.version }}"
54-
git push origin main
53+
git diff --cached --quiet && echo "Version already up to date" || (git commit -m "chore: bump version to ${{ github.event.inputs.version }}" && git push origin main)
5554
5655
# Build iOS artifacts
5756
build-ios:

0 commit comments

Comments
 (0)