Fix Stable Workflow

This commit is contained in:
Allan Niles 2025-03-11 21:35:35 -06:00
parent 9f1fafade5
commit ff9ea4cbd0
No known key found for this signature in database
GPG Key ID: 4801D0A65C62A5B6

View File

@ -15,7 +15,7 @@ jobs:
- name: Set Variables
run: |
cd /mnt/HDD/public/
wget "https://api.github.com/repos/EmulatorJS/EmulatorJS/releases/latest" -O .tmp.json
wget -q "https://api.github.com/repos/EmulatorJS/EmulatorJS/releases/latest" -O .tmp.json
version=$(jq -r '.tag_name' .tmp.json)
download_url=$(jq -r '.assets[0].browser_download_url' .tmp.json)
name=$(jq -r '.assets[0].name' .tmp.json)
@ -30,15 +30,11 @@ jobs:
echo "NAME=$name" >> $GITHUB_ENV
echo "OLD_VERSION=$old_version" >> $GITHUB_ENV
echo "V_VERSION=$v_version" >> $GITHUB_ENV
- name: Set Stable Version
run: |
cd /mnt/HDD/public/
mkdir -p ".stable"
jq --arg version "$VERSION" '.github = $VERSION' versions.json | sponge versions.json
- name: Download Stable
run: |
cd /mnt/HDD/public/
wget "$DOWNLOAD_URL" -O ".stable/$NAME"
mkdir -p ".stable"
wget -q "$DOWNLOAD_URL" -O ".stable/$NAME"
- name: Extract Stable
run: |
cd /mnt/HDD/public/.stable/
@ -50,13 +46,14 @@ jobs:
mv "$OLD_VERSION" "$VERSION"
mv stable "$OLD_VERSION"
mv .stable stable
jq --arg version "$VERSION" '.github = $version' versions.json | sponge versions.json
- name: Set Permissions
run: |
cd /mnt/HDD/public
chmod -R 755 stable/
- name: Update Stable Cores
run: |
rsync -az --delete /mnt/HDD/public/stable/data/cores/ /mnt/HDD/public/.EmulatorJS/data/cores/
rsync -a --delete /mnt/HDD/public/stable/data/cores/ /mnt/HDD/public/.EmulatorJS/data/cores/
- name: Zip Stable
run: |
cd /mnt/HDD/public/stable/data/
@ -68,13 +65,8 @@ jobs:
- name: Clean Up
run: |
cd /mnt/HDD/public/
rm "$OLD_VERSION/data/emulator.min.zip"
rm -f "$OLD_VERSION/data/emulator.min.zip"
rm -rf "$OLD_VERSION/data/minify/node_modules/"
rm "./releases/$OLD_VERSION.7z"
- name: Compress Old Version
run: |
cd /mnt/HDD/public/
7z a "./releases/$OLD_VERSION.7z" "./$OLD_VERSION/*"