Make the libretro branch only use stable releases, tag libretro releases

This commit is contained in:
Lior Halphon
2024-03-08 18:16:51 +02:00
parent 3ef8fab7c4
commit 06bc4cd0bf
2 changed files with 27 additions and 5 deletions

25
.github/actions/update_libretro.sh vendored Normal file
View File

@@ -0,0 +1,25 @@
set -e
LATEST=$(git tag --sort=-creatordate | grep "^v" | grep -v libretro | head -n 1)
if [ $(git tag -l "$LATEST"-libretro) ]; then
echo "The libretro branch is already up-to-date"
exit 0
fi
echo "Building boot ROMs..."
make -j bootroms
mv build/bin/BootROMs BootROMs/prebuilt
echo "Updating branch"
git config --global --add --bool push.autoSetupRemote true
git config --global user.name 'Libretro Updater'
git config --global user.email '<>'
git branch --delete libretro || true
git checkout tags/$LATEST -b libretro
git add BootROMs/prebuilt/*
git commit -m "Update libretro branch to $LATEST"
git tag "$LATEST"-libretro
git push --force --tags

View File

@@ -23,9 +23,6 @@ jobs:
shell: bash
run: |
./.github/actions/install_deps.sh ${{ matrix.os }}
- name: Build Boot ROMs
- name: Build Boot ROMs and Push
run: |
make -j bootroms && mv build/bin/BootROMs BootROMs/prebuilt
- name: Push changes
run: |
git config --global --add --bool push.autoSetupRemote true && git config --global user.name 'Libretro Updater' && (git branch --delete libretro || true) && git checkout -b libretro && git config --global user.email '<>' && git add BootROMs/prebuilt/* && git commit -m 'Update prebuilt boot ROMs' && git push --force
./.github/actions/update_libretro.sh