From 40212fb34cd94f4ac949ac1d66dcf7eaac4391c3 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 13 Feb 2026 22:22:47 +0100 Subject: [PATCH] Skip build number commit when already up to date The release job fails when the build number in the repo already matches the computed value, causing git commit to exit with code 1 on an empty changeset. Now we check for staged changes before committing. --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 031df522..0018f30d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -205,8 +205,10 @@ jobs: git config --local user.name "github-actions[bot]" sed -i 's/CURRENT_PROJECT_VERSION = [0-9]*/CURRENT_PROJECT_VERSION = ${{ env.BUILD_NUMBER }}/' Yattee.xcodeproj/project.pbxproj git add Yattee.xcodeproj/project.pbxproj - git commit -m "Bump build number to ${{ env.BUILD_NUMBER }}" - git push origin ${{ github.ref_name }} + git diff --cached --quiet && echo "Build number already up to date" || { + git commit -m "Bump build number to ${{ env.BUILD_NUMBER }}" + git push origin ${{ github.ref_name }} + } - uses: actions/download-artifact@v4 with: path: artifacts