mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Fix Stable Workflow
This commit is contained in:
parent
9f1fafade5
commit
ff9ea4cbd0
20
.github/workflows/stable.yml
vendored
20
.github/workflows/stable.yml
vendored
@ -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/*"
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user