Skip to content

Β» πŸ—Ώβ€’ Fordy-RR Riivolution Builder #2773

Β» πŸ—Ώβ€’ Fordy-RR Riivolution Builder

Β» πŸ—Ώβ€’ Fordy-RR Riivolution Builder #2773

Workflow file for this run

name: Β» πŸ—Ώβ€’ Fordy-RR Riivolution Builder
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
check-and-build:
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout Riivolution Branch
uses: actions/checkout@v4
with:
ref: Riivolution
- name: πŸ” Check Version & Changelog
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Fetch remote data from API
API_DATA=$(curl -s https://api.heyfordy.dev/rr_app/version-rr)
REMOTE_VERSION=$(echo "$API_DATA" | jq -r '.version')
REMOTE_CHANGELOG=$(echo "$API_DATA" | jq -r '.changelog')
TAG_NAME="RR-riivo_${REMOTE_VERSION}"
echo "version=$REMOTE_VERSION" >> $GITHUB_OUTPUT
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$REMOTE_CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Check if release already exists
if ! gh release view "$TAG_NAME" > /dev/null 2>&1; then
echo "New version detected. Starting build."
echo "run_build=true" >> $GITHUB_OUTPUT
else
echo "Release exists. Checking for missing changelog..."
CURRENT_BODY=$(gh release view "$TAG_NAME" --json body -q .body)
# Update if current body contains placeholder and API has real data
if [[ "$CURRENT_BODY" == *"No changelog released yet"* ]] && [[ "$REMOTE_CHANGELOG" != "No changelog released yet" ]]; then
echo "New changelog available. Updating release."
echo "update_changelog=true" >> $GITHUB_OUTPUT
else
echo "Everything up to date. Skipping."
echo "run_build=false" >> $GITHUB_OUTPUT
fi
fi
- name: πŸ› οΈ Setup Tools & Env
if: steps.check.outputs.run_build == 'true'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq wget unzip zip perl libarchive-tools
chmod +x wszst/wszst
chmod +x wszst/wbmgt
chmod +x builder/fordy-riivo.sh
echo "${{ github.workspace }}/wszst" >> $GITHUB_PATH
- name: πŸ—οΈ Run Build Script
if: steps.check.outputs.run_build == 'true'
run: |
./builder/fordy-riivo.sh "${{ steps.check.outputs.version }}"
- name: πŸš€ Create or Update Release
if: steps.check.outputs.run_build == 'true' || steps.check.outputs.update_changelog == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.check.outputs.tag_name }}
name: πŸ—Ώ Fordy-RR β€’ Riivolution (${{ steps.check.outputs.version }})
files: |
Fordy-RR-*.zip
UPDATE-Fordy-RR-*.zip
fail_on_unmatched_files: false
target_commitish: Riivolution
body: |
πŸ—Ώ **Auto-Generated Custom Build**
Based on Retro Rewind `v${{ steps.check.outputs.version }}`
**RR Changelog:**
```
${{ steps.check.outputs.changelog }}
```
**Custom changes:**
```
Modified some .bmg files within the "Language"-folder
to match my personal "MyStuff"-folder:
- 🏍️ Mach-Bike -> KFC-Mofa
- πŸ‘€ Daisy -> Steve
```
[⬇️ **Full** Download (First Install / Re-Install)](https://api.heyfordy.dev/dl?rr_full)
[⬇️ Download **Update-only**](https://api.heyfordy.dev/dl?rr_patch)
[⬇️ Download MyStuff](https://api.heyfordy.dev/dl?rr_mystuff)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}