mirror of
https://github.com/yattee/yattee.git
synced 2026-02-19 09:19:46 +00:00
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.
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -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 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
|
||||
|
||||
Reference in New Issue
Block a user