Skip to content

Official release build for Serial Loops #38

Official release build for Serial Loops

Official release build for Serial Loops #38

Workflow file for this run

name: Serial Loops Official Build
run-name: "Official release build for Serial Loops"
on:
# schedule:
# - cron: '0 23 * * *'
workflow_dispatch:
inputs:
version:
description: Release version
required: true
type: string
releaseNotes:
description: Release notes
required: true
type: string
permissions:
contents: write
env:
SLVersion: ${{ inputs.version == '' && format('0.3.pre.a{0}', github.run_number) || inputs.version }}
SLAssemblyVersion: ${{ inputs.version == '' && format('0.3.9999.a{0}', github.run_number) || inputs.version }}
jobs:
linux-flatpak-setup:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- run: pip install requests
- run: python install/linux/flatpak/flatpak-dotnet-generator.py --dotnet 8 --freedesktop 23.08 nuget-sources.json src/SerialLoops/SerialLoops.csproj
- name: Publish nuget-sources.json
uses: actions/upload-artifact@v4
with:
name: nuget-sources
path: nuget-sources.json
retention-days: 1
linux-flatpak:
needs: linux-flatpak-setup
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
options: --privileged
steps:
- name: Check out
uses: actions/checkout@v4
- name: Download nuget-sources.json
uses: actions/[email protected]
with:
name: nuget-sources
path: install/linux/flatpak/
- name: Export version
run: echo $SLVersion > install/linux/flatpak/VERSION
- name: Build flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
manifest-path: install/linux/flatpak/club.haroohie.SerialLoops.yaml
bundle: SerialLoops.flatpak
cache-key: flatpak-builder-${{ github.sha }}
- name: Upload flatpak
uses: actions/upload-artifact@v4
with:
name: linux-x64-flatpak
path: SerialLoops.flatpak
retention-days: 1
linux-dpkg-tarball:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- name: Build & Publish Serial Loops
run: dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 -r linux-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true
- name: Create tarball
run: |
chmod +x ./src/SerialLoops/bin/Release/net8.0/linux-x64/publish/SerialLoops
pushd ./src/SerialLoops/bin/Release/net8.0/linux-x64/publish
tar -czvf ../SerialLoops.tar.gz --transform "s,^\.\/,SerialLoops-$SLVersion/," .
popd
- name: Upload tarball
uses: actions/upload-artifact@v4
with:
name: linux-x64-tarball
path: src/SerialLoops/bin/Release/net8.0/linux-x64/SerialLoops.tar.gz
retention-days: 1
- name: Create deb package
shell: pwsh
run: |
Copy-Item -Path ./install/linux/dpkg-build -Destination ./dpkg-build -Recurse -Exclude ".gitkeep"
New-Item -ItemType "directory" -Path ./dpkg-build/SerialLoops/usr -Name bin
Push-Location ./dpkg-build/SerialLoops
((Get-Content -Path DEBIAN/control) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path DEBIAN/control
((Get-Content -Path usr/share/applications/SerialLoops.desktop) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path usr/share/applications/SerialLoops.desktop
Copy-Item -Path ../../src/SerialLoops/bin/Release/net8.0/linux-x64/publish/* -Destination ./usr/lib/SerialLoops -Recurse
ln -s /usr/lib/SerialLoops/SerialLoops usr/bin/SerialLoops
Set-Location ..
dpkg-deb --build SerialLoops
Pop-Location
- name: Upload dpkg
uses: actions/upload-artifact@v4
with:
name: linux-x64-dpkg
path: dpkg-build/SerialLoops.deb
retention-days: 1
linux-rpm:
runs-on: ubuntu-latest
container:
image: fedora:39
steps:
- name: Check out
uses: actions/checkout@v4
- name: Create RPM
run: |
cp -r install/linux/rpm/rpmbuild ~/
tar -czvf ~/rpmbuild/SOURCES/SerialLoops-$SLVersion.tar.gz --transform "s,^\.\/,SerialLoops-$SLVersion/," .
sed -i "s/#VERSION#/$SLVersion/g" ~/rpmbuild/SPECS/SerialLoops.spec
dnf install -y rpmdevtools rpmlint dotnet-sdk-8.0
pushd ~
rpmbuild -bb rpmbuild/SPECS/SerialLoops.spec
popd
mv ~/rpmbuild/RPMS/x86_64/SerialLoops-${{ env.SLVersion }}-1.fc39.x86_64.rpm SerialLoops.rpm
- name: Upload rpm
uses: actions/upload-artifact@v4
with:
name: linux-x64-rpm
path: SerialLoops.rpm
retention-days: 1
macos-pkg:
runs-on: macos-latest
strategy:
matrix:
rid: ['osx-x64', 'osx-arm64']
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: pip install macos-pkg-builder
- name: Restore
run: dotnet restore src/SerialLoops/SerialLoops.csproj -r ${{ matrix.rid }}
- name: Build .app
run: dotnet msbuild src/SerialLoops/SerialLoops.csproj -t:BundleApp -p:Configuration=Release -p:TargetFramework=net8.0 -p:RuntimeIdentifier=${{ matrix.rid }} -p:UseAppHost=true --p:SelfContained=true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true
- name: Build pkg installer
run: |
mkdir "install/macos/Serial Loops.app"
cp -r "src/SerialLoops/bin/Release/net8.0/${{ matrix.rid }}/publish/Serial Loops.app" "install/macos/"
cd install/macos/
chmod +x "./Serial Loops.app/Contents/MacOS/SerialLoops"
python serial_loops_pkg_builder.py $SLVersion ${{ matrix.rid }}
- name: Upload pkg installer
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rid }}-installer
path: install/macos/SerialLoops-${{ matrix.rid }}.pkg
retention-days: 1
windows:
runs-on: windows-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: '8.0.x'
- name: Build & Publish Serial Loops
shell: pwsh
run: |
dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0-windows -r win-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true
Compress-Archive -Path src/SerialLoops/bin/Release/net8.0-windows/win-x64/publish/ -DestinationPath src/SerialLoops/bin/Release/net8.0-windows/win-x64/SerialLoops-winx64.zip
- name: Upload Windows zip
uses: actions/upload-artifact@v4
with:
name: windows-x64-zip
path: src/SerialLoops/bin/Release/net8.0-windows/win-x64/SerialLoops-winx64.zip
retention-days: 1
- name: Download ISCC, Docker Desktop Installer, and devkitPro Updater
shell: pwsh
run: |
((Get-Content -Path install\windows\serial-loops.iss) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path install\windows\serial-loops.iss
Start-BitsTransfer -Source https://haroohie.nyc3.cdn.digitaloceanspaces.com/bootstrap/serial-loops/iscc.zip -Destination install\windows\iscc.zip
Expand-Archive -Path install\windows\iscc.zip -DestinationPath install\windows\
Start-BitsTransfer -Source https://github.com/devkitPro/installer/releases/download/v3.0.3/devkitProUpdater-3.0.3.exe -Destination install\windows\devkitProUpdater-3.0.3.exe
Start-BitsTransfer -Source https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe -Destination "install\windows\Docker Desktop Installer.exe"
- name: Compile Windows installer
run: install\windows\iscc\ISCC.exe .\install\windows\serial-loops.iss
- name: Upload Windows installer
uses: actions/upload-artifact@v4
with:
name: windows-x64-installer
path: install/windows/Output/SerialLoopsInstaller.exe
retention-days: 1
release:
runs-on: ubuntu-latest
needs: [ linux-flatpak, linux-dpkg-tarball, linux-rpm, macos-pkg, windows ]
steps:
- name: Download Linux flatpak
uses: actions/[email protected]
with:
name: linux-x64-flatpak
- name: Download Linux tarball
uses: actions/[email protected]
with:
name: linux-x64-tarball
- name: Download Linux dpkg
uses: actions/[email protected]
with:
name: linux-x64-dpkg
- name: Download Linux rpm
uses: actions/[email protected]
with:
name: linux-x64-rpm
- name: Download Apple Silicon macOS installer
uses: actions/[email protected]
with:
name: osx-arm64-installer
- name: Download Intel macOS installer
uses: actions/[email protected]
with:
name: osx-x64-installer
- name: Download Windows installer
uses: actions/[email protected]
with:
name: windows-x64-installer
- name: Download Windows portable zip
uses: actions/[email protected]
with:
name: windows-x64-zip
- name: Move and rename artifacts
shell: pwsh
run: |
New-Item -Type Directory -Path release
Get-ChildItem .
Move-Item -Path SerialLoops.flatpak -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).flatpak
Move-Item -Path SerialLoops.tar.gz -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).tar.gz
Move-Item -Path SerialLoops.deb -Destination release/SerialLoops-linux-x64-$($env:SLVersion).deb
Move-Item -Path SerialLoops.rpm -Destination release/SerialLoops-linux-x64-$($env:SLVersion)-1.fc39.x86_64.rpm
Move-Item -Path SerialLoops-osx-arm64.pkg -Destination release/SerialLoops-macOS-arm-v$($env:SLVersion).pkg
Move-Item -Path SerialLoops-osx-x64.pkg -Destination release/SerialLoops-macOS-x64-v$($env:SLVersion).pkg
Move-Item -Path SerialLoopsInstaller.exe -Destination release/SerialLoops-windows-x64-v$($env:SLVersion).exe
Move-Item -Path SerialLoops-winx64.zip -Destination release/SerialLoops-windows-x64-v$($env:SLVersion).zip
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Serial Loops v${{ env.SLVersion }}
tag_name: ${{ env.SLVersion }}
prerelease: ${{ inputs.version == '' }}
generate_release_notes: true
files: release/*
body: |
${{ inputs.releaseNotes }}
## Installation Notes
To test the game you will need to have a Nintendo DS emulator installed. We recommend [melonDS](https://melonds.kuribo64.net/) for its accuracy.
Because our application contacts GitHub's servers to check for new releases on launch, it is possible it will get flagged by firewall software – please allow it through so it can function correctly.
### Windows
Simply download the Windows installer application and run it. It will walk you through installation, including installing the necessary dependencies.
Alternatively, you can download the zip file for a portable application; however, dependencies are not included with this option.
### macOS
Pick the macOS pkg installer that fits your computer's architecture. Before executing it, you will need to open the Terminal application and run `xattr -cr /User/yourusernamehere/Downloads/pkginstallernamehere.pkg`,
replacing "yourusernamehere" with your username and "pkginstallernamehere.pkg" with the appropriate pkg installer filename. Running this command makes it so that the pkg installer is runnable even though we don't codesign it.
The pkg installer will guide you through installing Serial Loops and will automatically install the dependencies devkitARM and make if necessary.
#### Which macOS pkg installer should I choose?
If your Mac is newer, you will probably want the ARM installer. If it is older, you may want the x64 one. If unsure, download the ARM one first and attempt to run it – it will throw an error saying it can't be run on this computer if your computer is not able to run it. If that's the case, download the x64 one instead.
### Linux
We recommend using the provided flatpak as it is the easiest to use. First, install flatpak if you haven't already. Then, download the flatpak and double click it or run `flatpak install` on it from the terminal. It will then install itself,
bringing all the necessary dependencies with it.
If you would rather manually install, follow the below instructions:
* The `.deb` package is intended for Debian-based distros (e.g. Ubuntu). Install it with `sudo apt install -f ./SerialLoops-${{ env.SLVersion }}_amd64.deb`.
* The `.rpm` package is intended for Red Hat distros (e.g. Fedora). Install it with `sudo dnf install ./SerialLoops-${{ env.SLVersion }}-1.fc39.x86_64.rpm`.
* For other Linux distros, please use the binaries packaged in the `.tar.gz` archive; when doing so, ensure you install the OpenAL binaries so audio playback works.