Skip to content

Official release build for Serial Loops #54

Official release build for Serial Loops

Official release build for Serial Loops #54

name: Serial Loops Official Build
run-name: "Official release build for Serial Loops"
on:
push:
branches:
- 'main'
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.4.apre.{0}', github.run_number) || inputs.version }}
SLAssemblyVersion: ${{ inputs.version == '' && format('0.4.8888.{0}', github.run_number) || inputs.version }}
jobs:
linux-appimage:
strategy:
matrix:
type:
- { image: 'ubuntu-latest', rid: 'linux-x64', arch: 'x86_64', apt_arch: 'amd64', apt_uri: 'http:\/\/archive.ubuntu.com\/ubuntu\/' }
- { image: 'ubuntu-24.04-arm', rid: 'linux-arm64', arch: 'aarch64', apt_arch: 'arm64', apt_uri: 'http:\/\/ports.ubuntu.com\/ubuntu-ports\/' }
runs-on: ${{ matrix.type.image }}
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: '8.0.x'
- name: Build & Publish Serial Loops
run: dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 -r ${{ matrix.type.rid }} --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true
- name: Set up AppDir
run: |
sed -i "s/#VERSION#/$SLVersion/g" ./install/linux/appimage/AppImageBuilder.yml
sed -i "s/#APT_ARCH#/${{ matrix.type.apt_arch }}/g" ./install/linux/appimage/AppImageBuilder.yml
sed -i "s/#URI#/${{ matrix.type.apt_uri }}/g" ./install/linux/appimage/AppImageBuilder.yml
sed -i "s/#ARCH#/${{ matrix.type.arch }}/g" ./install/linux/appimage/AppImageBuilder.yml
mkdir -p ./install/linux/appimage/AppDir/usr/bin
chmod +x ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/SerialLoops
chmod +x ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/NitroPacker.SymTableHelper
mv ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/* ./install/linux/appimage/AppDir/usr/bin/
mkdir -p ./install/linux/appimage/AppDir/usr/share/icons/default/scalable/apps/
cp ./src/SerialLoops/Assets/Icons/AppIcon.svg ./install/linux/appimage/AppDir/usr/share/icons/default/scalable/apps/club.haroohie.SerialLoops.svg
- name: Build AppImage
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/haroohie-club/appimage-builder:main
options: -v ${{ github.workspace }}:/work -w /work
run: appimage-builder --recipe=./install/linux/appimage/AppImageBuilder.yml --skip-tests
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-appimage
path: SerialLoops-${{ matrix.type.arch }}.AppImage
retention-days: 1
linux-dpkg-tarball:
strategy:
matrix:
type: [ { image: 'ubuntu-latest', rid: 'linux-x64', arch: 'amd64' }, { image: 'ubuntu-24.04-arm', rid: 'linux-arm64', arch: 'arm64' } ]
runs-on: ${{ matrix.type.image }}
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: '8.0.x'
- name: Build & Publish Serial Loops
run: dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 -r ${{ matrix.type.rid }} --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true
- name: Create tarball
run: |
chmod +x ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/SerialLoops
chmod +x ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/NitroPacker.SymTableHelper
pushd ./src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish
tar -czvf ../SerialLoops-${{ matrix.type.rid }}.tar.gz --transform "s,^\.\/,SerialLoops-$SLVersion/," .
popd
- name: Upload tarball
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-tarball
path: src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/SerialLoops-${{ matrix.type.rid }}.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 DEBIAN/control) -replace '#ARCH#', '${{ matrix.type.arch }}') | 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/${{ matrix.type.rid }}/publish/* -Destination ./usr/lib/SerialLoops -Recurse
ln -s /usr/lib/SerialLoops/SerialLoops usr/bin/SerialLoops
Copy-Item -Path ../../src/SerialLoops/Assets/Icons/AppIcon.png usr/lib/SerialLoops/SerialLoops.png
Set-Location ..
dpkg-deb --build SerialLoops
Pop-Location
Move-Item -Path dpkg-build/SerialLoops.deb -Destination dpkg-build/SerialLoops-${{ matrix.type.rid }}.deb
- name: Upload dpkg
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-dpkg
path: dpkg-build/SerialLoops-${{ matrix.type.rid }}.deb
retention-days: 1
linux-rpm:
strategy:
matrix:
type: [ { image: 'ubuntu-latest', rid: 'linux-x64', arch: 'x86_64' }, { image: 'ubuntu-24.04-arm', rid: 'linux-arm64', arch: 'aarch64' } ]
runs-on: ${{ matrix.type.image }}
container:
image: fedora:39
steps:
- name: Install git on container
run: dnf install -y git
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
- 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
sed -i "s/#RID#/${{ matrix.type.rid }}/g" ~/rpmbuild/SPECS/SerialLoops.spec
sed -i "s/#ARCH#/${{ matrix.type.arch }}/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/${{ matrix.type.arch }}/SerialLoops-${{ env.SLVersion }}-1.fc39.${{ matrix.type.arch }}.rpm SerialLoops-${{ matrix.type.rid }}.rpm
- name: Upload rpm
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-rpm
path: SerialLoops-${{ matrix.type.rid }}.rpm
retention-days: 1
macos-pkg:
runs-on: macos-latest
strategy:
matrix:
type: [ { rid: 'osx-x64', arch: 'x86_64' }, { rid: 'osx-arm64', arch: 'arm64' } ]
steps:
- name: Check out Serial Loops
uses: actions/checkout@v4
with:
submodules: true
- name: Check out SDL
uses: actions/checkout@v4
with:
repository: 'libsdl-org/SDL'
ref: release-2.32.x
path: SDL
- name: SDL cmake configure
run: pushd ${{ github.workspace }}/SDL && cmake -S . -B build -DSDL_SHARED=ON -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_OSX_ARCHITECTURES="${{ matrix.type.arch }}" && popd
- name: SDL cmake build
run: pushd ${{ github.workspace }}/SDL && cmake --build build && popd
- name: Setup .NET
uses: actions/setup-dotnet@v4.1.0
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: Copy in SDL
run: cp -L ${{ github.workspace }}/SDL/build/libSDL2-2.0.dylib "src/SerialLoops/libSDL2.dylib"
- name: Restore
run: dotnet restore src/SerialLoops/SerialLoops.csproj -r ${{ matrix.type.rid }}
- name: Build .app
run: dotnet msbuild src/SerialLoops/SerialLoops.csproj -t:BundleApp -p:Configuration=Release -p:TargetFramework=net8.0 -p:RuntimeIdentifier=${{ matrix.type.rid }} -p:UseAppHost=true -p:SelfContained=true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:CIBuild=true
- name: Build pkg installer
run: |
mkdir "install/macos/Serial Loops.app"
cp -r "src/SerialLoops/bin/Release/net8.0/${{ matrix.type.rid }}/publish/Serial Loops.app" "install/macos/"
cd install/macos/
chmod +x "./Serial Loops.app/Contents/MacOS/SerialLoops"
chmod +x "./Serial Loops.app/Contents/MacOS/NitroPacker.SymTableHelper"
python serial_loops_pkg_builder.py $SLVersion ${{ matrix.type.rid }}
- name: Upload pkg installer
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-installer
path: install/macos/SerialLoops-${{ matrix.type.rid }}.pkg
retention-days: 1
windows:
runs-on: windows-latest
strategy:
matrix:
type: [
{ rid: 'win-x64', ninja: 'https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-win.zip', llvm: 'LLVM-19.1.6-win64.exe' },
{ rid: 'win-x86', ninja: 'https://haroohie.nyc3.cdn.digitaloceanspaces.com/bootstrap/serial-loops/ninja/ninja-win-x86.zip', llvm: 'LLVM-19.1.6-win32.exe' },
{ rid: 'win-arm64', ninja: 'https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-winarm64.zip', llvm: 'LLVM-19.1.6-woa64.exe' }
]
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4.1.0
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 ${{ matrix.type.rid }} --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true
Compress-Archive -Path src/SerialLoops/bin/Release/net8.0-windows/${{ matrix.type.rid }}/publish/ -DestinationPath src/SerialLoops/bin/Release/net8.0-windows/${{ matrix.type.rid }}/SerialLoops-${{ matrix.type.rid }}.zip
- name: Upload Windows zip
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-zip
path: src/SerialLoops/bin/Release/net8.0-windows/${{ matrix.type.rid }}/SerialLoops-${{ matrix.type.rid }}.zip
retention-days: 1
- name: Download ISCC, Ninja, and LLVM Installer
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 ${{ matrix.type.ninja }} -Destination install\windows\ninja.zip
Expand-Archive -Path install\windows\ninja.zip -DestinationPath install\windows\
Start-BitsTransfer -Source https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.6/${{ matrix.type.llvm }} -Destination install\windows\llvm.exe
- name: Compile Windows installer
run: install\windows\iscc\ISCC.exe /DTargetArchitecture=${{ matrix.type.rid }} .\install\windows\serial-loops.iss
- name: Upload Windows installer
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.rid }}-installer
path: install/windows/Output/SLInstaller-${{ matrix.type.rid }}.exe
retention-days: 1
release:
runs-on: ubuntu-latest
needs: [ linux-appimage, linux-dpkg-tarball, linux-rpm, macos-pkg, windows ]
steps:
- name: Download Linux x64 AppImage
uses: actions/download-artifact@v4.1.8
with:
name: linux-x64-appimage
- name: Download Linux ARM64 AppImage
uses: actions/download-artifact@v4.1.8
with:
name: linux-arm64-appimage
- name: Download Linux x64 tarball
uses: actions/download-artifact@v4.1.8
with:
name: linux-x64-tarball
- name: Download Linux ARM64 tarball
uses: actions/download-artifact@v4.1.8
with:
name: linux-arm64-tarball
- name: Download Linu x64 dpkg
uses: actions/download-artifact@v4.1.8
with:
name: linux-x64-dpkg
- name: Download Linux ARM64 dpkg
uses: actions/download-artifact@v4.1.8
with:
name: linux-arm64-dpkg
- name: Download Linux x64 rpm
uses: actions/download-artifact@v4.1.8
with:
name: linux-x64-rpm
- name: Download Linux ARM64 rpm
uses: actions/download-artifact@v4.1.8
with:
name: linux-arm64-rpm
- name: Download Apple Silicon macOS installer
uses: actions/download-artifact@v4.1.8
with:
name: osx-arm64-installer
- name: Download Intel macOS installer
uses: actions/download-artifact@v4.1.8
with:
name: osx-x64-installer
- name: Download Windows x64 installer
uses: actions/download-artifact@v4.1.8
with:
name: win-x64-installer
- name: Download Windows x86 installer
uses: actions/download-artifact@v4.1.8
with:
name: win-x86-installer
- name: Download Windows ARM64 installer
uses: actions/download-artifact@v4.1.8
with:
name: win-arm64-installer
- name: Download Windows x64 portable zip
uses: actions/download-artifact@v4.1.8
with:
name: win-x64-zip
- name: Download Windows x86 portable zip
uses: actions/download-artifact@v4.1.8
with:
name: win-x86-zip
- name: Download Windows ARM64 portable zip
uses: actions/download-artifact@v4.1.8
with:
name: win-arm64-zip
- name: Move and rename artifacts
shell: pwsh
run: |
New-Item -Type Directory -Path release
Get-ChildItem .
Move-Item -Path SerialLoops-x86_64.AppImage -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).AppImage
Move-Item -Path SerialLoops-aarch64.AppImage -Destination release/SerialLoops-linux-arm64-v$($env:SLVersion).AppImage
Move-Item -Path SerialLoops-linux-x64.tar.gz -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).tar.gz
Move-Item -Path SerialLoops-linux-arm64.tar.gz -Destination release/SerialLoops-linux-arm64-v$($env:SLVersion).tar.gz
Move-Item -Path SerialLoops-linux-x64.deb -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).deb
Move-Item -Path SerialLoops-linux-arm64.deb -Destination release/SerialLoops-linux-arm64-v$($env:SLVersion).deb
Move-Item -Path SerialLoops-linux-x64.rpm -Destination release/SerialLoops-linux-x64-v$($env:SLVersion)-1.fc39.x86_64.rpm
Move-Item -Path SerialLoops-linux-arm64.rpm -Destination release/SerialLoops-linux-arm64-v$($env:SLVersion)-1.fc39.aarch64.rpm
Move-Item -Path SerialLoops-osx-arm64.pkg -Destination release/SerialLoops-macOS-arm-v$($env:SLVersion)-installer.pkg
Move-Item -Path SerialLoops-osx-x64.pkg -Destination release/SerialLoops-macOS-x64-v$($env:SLVersion)-installer.pkg
Move-Item -Path SLInstaller-win-x64.exe -Destination release/SerialLoops-windows-x64-v$($env:SLVersion)-installer.exe
Move-Item -Path SLInstaller-win-x86.exe -Destination release/SerialLoops-windows-x86-v$($env:SLVersion)-installer.exe
Move-Item -Path SLInstaller-win-arm64.exe -Destination release/SerialLoops-windows-arm64-v$($env:SLVersion)-installer.exe
Move-Item -Path SerialLoops-win-x64.zip -Destination release/SerialLoops-windows-x64-v$($env:SLVersion)-portable.zip
Move-Item -Path SerialLoops-win-x86.zip -Destination release/SerialLoops-windows-x86-v$($env:SLVersion)-portable.zip
Move-Item -Path SerialLoops-win-arm64.zip -Destination release/SerialLoops-windows-arm64-v$($env:SLVersion)-portable.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 for your architecture and run it. It will walk you through installation, including installing the necessary dependencies. Specifically, it will run the **LLVM installer**.
Alternatively, you can download the zip file for a portable application; however, dependencies are not included with this option.
#### Which Windows installer should I choose?
Most modern Windows machines are x64-based; however, there are quite a few Windows laptops that now run with ARM processors. If you're not sure, you can download both—only the one that matches your computer's architecture will run. The x86 installer should only be used on older Windows hardware (theoretically, it should support Windows 7+, though we do not officially support older operating systems).
### 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 ~/Downloads/SerialLoops-macOS-arm-v${{ env.SLVersion }}-installer.pkg` for the ARM installer and `xattr -cr ~/Downloads/SerialLoops-macOS-x64-v${{ env.SLVersion }}-installer.pkg` for the x64 installer. This is required because we currently don't codesign the installer, meaning macOS will refuse to run it without explicit approval from you.
The pkg installer will guide you through installing Serial Loops and will automatically install the LLVM and ninja dependencies. If you don't already have the [Homebrew package manager](https://brew.sh) installed, it will automatically install this for you and then use it to install LLVM (and LLD) and ninja. This may take as long as five to ten minutes depending on the speed of your computer/internet connection—please be patient!
#### 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. To make sure, go to Settings → About and check your chip. If it is an Intel, you want the x64 installer. If it is an Apple chip, you want the ARM installer.
The first time you install Serial Loops, this process can take several minutes, so please be patient!
### Linux
We highly recommend installing the [Serial Loops Flatpak from Flathub](https://flathub.org/apps/club.haroohie.SerialLoops). This is the simplest way to run Serial Loops and comes with the added benefit of auto-updates for major versions via Flathub.
You can also install the official [melonDS Flatpak from Flathub](https://flathub.org/apps/net.kuribo64.melonDS) to use as your emulator.
However, if you want to use a preview version of Serial Loops or you simply don't want to install Flatpak, you can instead use one of our other distribution:
* The AppImage is designed to run on all Linux distros and is an easy, click-once option.
* The `.deb` package is intended for Debian-based distros (e.g. Ubuntu). Install it with `sudo apt install -f ./SerialLoops-linux-x64-${{ env.SLVersion }}.deb`.
* The `.rpm` package is intended for Red Hat-based distros (e.g. Fedora). Install it with `sudo dnf install ./SerialLoops-linux-x64-${{ env.SLVersion }}-1.fc39.x86_64.rpm`.
* You may also opt to simply use the binaries packaged in the `.tar.gz` archive; when doing so, ensure you install the SDL2 binaries so audio playback works.