2 Commits

Author SHA1 Message Date
f3d460ea37 Merge branch 'main' of https://git.devbeni.lol/MineDivinity/pack
All checks were successful
Texture Pack Packaging and Release / package-and-release (push) Successful in 8s
2025-06-22 02:57:32 +02:00
6dfc98b982 Enhance build-and-release workflow to handle merge conflicts and improve version update logic 2025-06-22 02:57:30 +02:00

View File

@ -11,6 +11,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@v3
@ -60,9 +64,18 @@ jobs:
- name: Commit version update
run: |
git pull origin main
# Pull changes and handle potential merge conflicts
git pull origin main || true
# If conflict occurs, keep both version entries
if git diff --name-only --diff-filter=U | grep -q "versions.txt"; then
git checkout --ours versions.txt
echo "New version: ${{ env.VERSION }}" >> versions.txt
git add versions.txt
fi
git add versions.txt
git commit -m "Update to version ${{ env.VERSION }} [skip ci]"
git commit -m "Update to version ${{ env.VERSION }} [skip ci]" || echo "No changes to commit"
git push origin main
- name: Create Release