diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0cacfa..a6565eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,16 @@ jobs: if: matrix.build == 'linux' run: | sudo apt-get update - sudo apt-get install -y libssl-dev + sudo apt-get install -y libssl-dev desktop-file-utils zsync libfuse2 + + - name: Download AppImageKit + run: | + curl -L https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o ./appimagetool.AppImage + chmod +x ./appimagetool.AppImage + mkdir -p $HOME/.local/bin + mv ./appimagetool.AppImage $HOME/.local/bin/appimagetool + + # /home/runner/.local/bin - uses: cachix/install-nix-action@v18 with: @@ -56,17 +65,20 @@ jobs: - name: Build run: cargo build -r --target ${{ matrix.target }} --locked + - name: Install Cargo Tools + run: cargo install cargo-deb cargo-generate-rpm cargo-appimage + - name: Build Deb (linux) if: matrix.build == 'linux' - run: | - cargo install cargo-deb - cargo deb -o protontweaks.deb + run: cargo deb -o protontweaks.deb - name: Build RPM (linux) if: matrix.build == 'linux' - run: | - cargo install cargo-generate-rpm - cargo generate-rpm -o protontweaks.rpm + run: cargo generate-rpm -o protontweaks.rpm + + - name: Build AppImage (linux) + if: matrix.build == 'linux' + run: cargo appimage - name: Rename Binaries (linux / macos) if: matrix.build != 'windows' @@ -78,6 +90,7 @@ jobs: path: | target/${{ matrix.target }}/release/protontweaks.exe target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }} + target/appimage/protontweaks.AppImage protontweaks.deb protontweaks.rpm @@ -88,5 +101,6 @@ jobs: files: | target/${{ matrix.target }}/release/protontweaks.exe target/${{ matrix.target }}/release/protontweaks-${{ matrix.target }} + target/appimage/protontweaks.AppImage protontweaks.deb protontweaks.rpm diff --git a/.gitignore b/.gitignore index b5a2475..8cf50c5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ lcov.info *.rpm .protontweaks.json tests/.configs/ +icon.png diff --git a/Makefile b/Makefile index 7c7dc68..5800b32 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,7 @@ validate: killall steam && sleep 5 || true nix build nix shell --command steam + +validate-appimage: + cargo appimage + appimage-run ./target/appimage/protontweaks.AppImage --version diff --git a/shell.nix b/shell.nix index 339acd7..39cb064 100644 --- a/shell.nix +++ b/shell.nix @@ -15,6 +15,8 @@ let gcc rustfmt clippy + appimagekit + appimage-run ]; system = {