Skip to content

.github/workflows/ruffle-update.yml #3

.github/workflows/ruffle-update.yml

.github/workflows/ruffle-update.yml #3

Workflow file for this run

name: Update Ruffle
on:
schedule:
- cron: '0 0 * * *' # run everyday at midnight
workflow_dispatch: # allows manual trigger
jobs:
update:
runs-on: self-hosted # use selfhosted runner
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '20' # update to Node 20
- name: Download Ruffle
run: |
Invoke-WebRequest -Uri https://github.com/ruffle-rs/ruffle/releases/latest/download/ruffle_web_latest.zip -OutFile ruffle.zip
Expand-Archive -Path ruffle.zip -DestinationPath ruffle_new
- name: Backup existing Ruffle
run: |
mv ruffle ruffle_backup || true
- name: Copy new Ruffle files
run: |
robocopy ruffle_new ruffle /E /MT:32
- name: Remove old Ruffle
run: |
rm -rf ruffle_backup
- name: Commit and push if it changed
run: |
git config user.name "Ruffle Updater"
git config user.email "your-email@example.com" # Use a valid email
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Update Ruffle"
git push