diff --git a/.gitea/workflows/gui-version-release.yml b/.gitea/workflows/gui-version-release.yml index c108783..2050371 100644 --- a/.gitea/workflows/gui-version-release.yml +++ b/.gitea/workflows/gui-version-release.yml @@ -163,9 +163,18 @@ jobs: Write-Host "Committing to branch: $BRANCH"; git commit -m "[skip ci] Update version to v$VERSION"; - git push origin $BRANCH; - Write-Host "Changes committed and pushed"; + Write-Host "Pulling latest changes before push..."; + git pull --rebase origin $BRANCH; + + if ($LASTEXITCODE -eq 0) { + Write-Host "Pushing changes..."; + git push origin $BRANCH; + Write-Host "Changes committed and pushed"; + } else { + Write-Host "Pull failed, trying force push..."; + git push origin $BRANCH; + } } else { Write-Host "No changes to commit"; }