From 9f1fafade5643243377370651a2d7966f2444eeb Mon Sep 17 00:00:00 2001 From: Allan Niles Date: Tue, 11 Mar 2025 17:57:26 -0600 Subject: [PATCH] Add New Contributors & Update Workflows --- .github/workflows/latest.yml | 24 +++++++++++-- .github/workflows/stable.yml | 68 ++++++++++++++++++++++++++++++++++-- docs/Contributors.md | 15 ++++---- 3 files changed, 97 insertions(+), 10 deletions(-) diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index ee8680f..a150619 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -12,7 +12,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Run Script + - name: Set Permissions run: | cd /mnt/HDD/public - ./.latest.sh + chmod -R 755 .EmulatorJS/ + - name: Update Stable + run: | + cd /mnt/HDD/public/.EmulatorJS/ + git fetch --all + git reset --hard origin/main + git pull + - name: Minify Files + run: | + cd /mnt/HDD/public/.EmulatorJS/data/minify/ + npm i + npm run build + - name: Zip Minified Files + run: | + cd /mnt/HDD/public/.EmulatorJS/data/ + zip emulator.min.zip emulator.min.js emulator.min.css + - name: Clean Up Minify + run: | + cd /mnt/HDD/public/.EmulatorJS/data/ + rm "minify/package-lock.json" + rm -rf "minify/node_modules/" \ No newline at end of file diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 2b15dfd..7d8837f 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -12,7 +12,71 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Run Script + - name: Set Variables + run: | + cd /mnt/HDD/public/ + wget "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) + old_version=$(jq -r '.github' versions.json) + v_version="$version" + if [[ $version == v* ]]; then + version="${version:1}" + fi + rm .tmp.json + echo "VERSION=$version" >> $GITHUB_ENV + echo "DOWNLOAD_URL=$download_url" >> $GITHUB_ENV + 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" + - name: Extract Stable + run: | + cd /mnt/HDD/public/.stable/ + 7z x "$NAME" + - name: Move Versions + run: | + cd /mnt/HDD/public/ + mv ".stable/$NAME" releases/ + mv "$OLD_VERSION" "$VERSION" + mv stable "$OLD_VERSION" + mv .stable stable + - name: Set Permissions run: | cd /mnt/HDD/public - ./.stable.sh + chmod -R 755 stable/ + - name: Update Stable Cores + run: | + rsync -az --delete /mnt/HDD/public/stable/data/cores/ /mnt/HDD/public/.EmulatorJS/data/cores/ + - name: Zip Stable + run: | + cd /mnt/HDD/public/stable/data/ + zip emulator.min.zip emulator.min.js emulator.min.css + - name: Update Version + run: | + cd /mnt/HDD/public/ + jq --arg old_version "$OLD_VERSION" '.versions += {($old_version): ($old_version + "/")}' versions.json | sponge versions.json + - name: Clean Up + run: | + cd /mnt/HDD/public/ + rm "$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/*" + + + + + diff --git a/docs/Contributors.md b/docs/Contributors.md index bb82de8..9f39cf1 100644 --- a/docs/Contributors.md +++ b/docs/Contributors.md @@ -69,16 +69,18 @@
![Avatar Alexey]  -![Avatar gantoine]  -![Avatar incredibleIdea]  ![Avatar angelmarfil]  +![Avatar incredibleIdea]  +![Avatar gantoine]  ![Avatar Grey]  -  +  ![Avatar pastisme]  -![Avatar t3chnob0y]  -![Avatar iits-reza]  -![Avatar ZhaoTonggang]  ![Avatar iGoodie]  +![Avatar ZhaoTonggang]  +![Avatar iits-reza]  +![Avatar t3chnob0y]  +![Avatar kellenmace]  +  ![Avatar IvanMazzoli]  ![Avatar jonas0b1011001]    @@ -137,6 +139,7 @@ [Avatar iits-reza]: https://github.com/iits-reza.png?size=95 +[Avatar kellenmace]: https://github.com/kellenmace.png?size=95 [Badge Ethan GitHub]: https://img.shields.io/badge/Ethan_O'_Brien-181717.svg?style=for-the-badge&logo=GitHub&logoColor=white