Build AppImage #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build AppImage | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to build (e.g., 1.2.0)' | |
| required: false | |
| jobs: | |
| build-appimage: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "release" ]; then | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| elif [ -n "${{ github.event.inputs.version }}" ]; then | |
| echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d'\"' -f2)" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libssl-dev \ | |
| libpipewire-0.3-dev \ | |
| libspa-0.2-dev \ | |
| libdbus-1-dev \ | |
| libpam0g-dev \ | |
| libfuse3-dev \ | |
| libxkbcommon-dev \ | |
| libgtk-4-dev \ | |
| libadwaita-1-dev \ | |
| libclang-dev \ | |
| pkg-config \ | |
| nasm | |
| - name: Build binary | |
| run: | | |
| cargo build --release --no-default-features --features "h264,libei,gui" | |
| - name: Prepare AppDir | |
| run: | | |
| mkdir -p AppDir/usr/bin | |
| mkdir -p AppDir/usr/share/applications | |
| mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps | |
| mkdir -p AppDir/usr/share/icons/hicolor/128x128/apps | |
| mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps | |
| mkdir -p AppDir/usr/share/icons/hicolor/48x48/apps | |
| mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps | |
| # Copy binaries | |
| cp target/release/lamco-rdp-server AppDir/usr/bin/ | |
| cp target/release/lamco-rdp-server-gui AppDir/usr/bin/ || true | |
| # Copy desktop file | |
| cp packaging/io.lamco.rdp-server.desktop AppDir/usr/share/applications/ | |
| # Copy icons (PNG only - no SVG due to rendering issues) | |
| cp packaging/icons/io.lamco.rdp-server-256.png AppDir/usr/share/icons/hicolor/256x256/apps/io.lamco.rdp-server.png | |
| cp packaging/icons/io.lamco.rdp-server-128.png AppDir/usr/share/icons/hicolor/128x128/apps/io.lamco.rdp-server.png | |
| cp packaging/icons/io.lamco.rdp-server-64.png AppDir/usr/share/icons/hicolor/64x64/apps/io.lamco.rdp-server.png | |
| cp packaging/icons/io.lamco.rdp-server-48.png AppDir/usr/share/icons/hicolor/48x48/apps/io.lamco.rdp-server.png | |
| cp packaging/icons/io.lamco.rdp-server-32.png AppDir/usr/share/icons/hicolor/32x32/apps/io.lamco.rdp-server.png | |
| - name: Build AppImage | |
| run: | | |
| # Install appimage-builder | |
| sudo apt-get install -y python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace | |
| sudo pip3 install appimage-builder | |
| # Build AppImage | |
| VERSION=${{ steps.version.outputs.VERSION }} appimage-builder --recipe packaging/appimage.yml --skip-test | |
| - name: Rename AppImage | |
| run: | | |
| mv *.AppImage lamco-rdp-server-${{ steps.version.outputs.VERSION }}-x86_64.AppImage || true | |
| mv *.AppImage.zsync lamco-rdp-server-${{ steps.version.outputs.VERSION }}-x86_64.AppImage.zsync || true | |
| - name: Upload to Release | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| lamco-rdp-server-*.AppImage | |
| lamco-rdp-server-*.AppImage.zsync | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload as Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AppImage | |
| path: | | |
| lamco-rdp-server-*.AppImage | |
| lamco-rdp-server-*.AppImage.zsync |