Skip to content

Update launcher

Update launcher #116

Workflow file for this run

name: Upload to Cloudflare R2
on:
push:
paths:
- 'launcher/Flarial.Launcher.exe'
- 'launcher/NewSupported.txt'
workflow_run:
workflows: ["make hashbrowns"]
types:
- completed
workflow_dispatch:
jobs:
upload-to-r2:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure AWS CLI for R2
run: |
aws configure set aws_access_key_id ${{ secrets.R2_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.R2_SECRET_ACCESS_KEY }}
aws configure set region auto
- name: Upload files to R2
env:
R2_ENDPOINT: https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
R2_BUCKET: ${{ secrets.R2_BUCKET_NAME }}
run: |
# Upload Flarial Launcher version metadata.
if [ -f "launcher/launcherVersion.txt" ]; then
aws s3 cp launcher/launcherVersion.txt s3://${R2_BUCKET}/launcher/launcherVersion.txt \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded launcherVersion.txt"
fi
# Upload Flarial Launcher executable.
if [ -f "launcher/Flarial.Launcher.exe" ]; then
aws s3 cp launcher/Flarial.Launcher.exe s3://${R2_BUCKET}/launcher/Flarial.Launcher.exe \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded Flarial.Launcher.exe"
fi
# Upload DLL hashes metadata.
if [ -f "dll_hashes.json" ]; then
aws s3 cp dll_hashes.json s3://${R2_BUCKET}/dll_hashes.json \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded dll_hashes.json"
fi
# Upload supported versions metadata.
if [ -f "launcher/NewSupported.txt" ]; then
aws s3 cp launcher/NewSupported.txt s3://${R2_BUCKET}/launcher/NewSupported.txt \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded NewSupported.txt"
fi
if [ -f "launcher/Flarial.Bootstrapper.exe" ]; then
aws s3 cp launcher/Flarial.Bootstrapper.exe s3://${R2_BUCKET}/launcher/Flarial.Bootstrapper.exe \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded Flarial.Bootstrapper.exe"
fi
# Upload release build of the client.
if [ -f "dll/latest.dll" ]; then
aws s3 cp dll/latest.dll s3://${R2_BUCKET}/dll/latest.dll \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded latest.dll"
fi
# Upload beta build of the client.
if [ -f "dll/beta.dll" ]; then
aws s3 cp dll/beta.dll s3://${R2_BUCKET}/dll/beta.dll \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded beta.dll"
fi
if [ -f "202.txt" ]; then
aws s3 cp 202.txt s3://${R2_BUCKET}/202.txt \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded 202.txt"
fi
# Fetch latest version of Pyroclastic for the launcher to use.
curl -L "https://github.com/Aetopia/Pyroclastic/releases/latest/download/gamelaunchhelper.dll" -o "launcher/gamelaunchhelper.dll"
if [ -f "launcher/gamelaunchhelper.dll" ]; then
aws s3 cp launcher/gamelaunchhelper.dll s3://${R2_BUCKET}/launcher/gamelaunchhelper.dll \
--endpoint-url ${R2_ENDPOINT}
echo "✓ Uploaded gamelaunchhelper.dll"
fi
- name: Verify uploads
env:
R2_ENDPOINT: https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
R2_BUCKET: ${{ secrets.R2_BUCKET_NAME }}
run: |
echo "Files in R2 bucket:"
aws s3 ls s3://${R2_BUCKET}/ --recursive --endpoint-url ${R2_ENDPOINT}