name: Build and Package AppImage, Windows Executable, and macOS DMG on: push: branches: - main pull_request: jobs: build-linux: runs-on: ubuntu-20.04 steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - name: Set up CMake uses: lukka/get-cmake@latest with: cmakeVersion: '3.22.0' - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y \ build-essential \ libssl-dev \ libx11-dev \ libxext-dev \ libxrandr-dev \ libxinerama-dev \ libxcursor-dev \ zlib1g-dev \ libglu1-mesa-dev \ libgtk-3-dev \ libwayland-dev \ fuse sudo modprobe fuse - name: Configure with CMake run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release - name: Build the project run: cmake --build build --config Release - name: Download linuxdeploy run: | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x linuxdeploy-x86_64.AppImage sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy - name: Create AppImage run: | cp -r build/PlayerLink linux/AppDir/usr/bin/ linuxdeploy --appdir=linux/AppDir --output appimage - name: Upload AppImage artifact uses: actions/upload-artifact@v4 with: name: PlayerLink-AppImage path: ./*.AppImage build-windows: runs-on: windows-latest steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - name: Set up CMake uses: lukka/get-cmake@latest with: cmakeVersion: '3.22.0' - name: Configure with CMake run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release - name: Build the project run: cmake --build build --config Release - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: name: PlayerLink-Windows-Executable path: build/Release/* build-macos: runs-on: macos-15 steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - name: Set up CMake uses: lukka/get-cmake@latest with: cmakeVersion: '3.22.0' - name: Configure with CMake run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release - name: Build the project run: cmake --build build --config Release - name: Create DMG package run: | mkdir -p dmg/PlayerLink cp -r build/PlayerLink.app dmg/PlayerLink/ hdiutil create -volname "PlayerLink" -srcfolder dmg/PlayerLink -ov -format UDZO PlayerLink.dmg - name: Upload macOS DMG artifact uses: actions/upload-artifact@v4 with: name: PlayerLink-macOS-DMG path: PlayerLink.dmg