From 6abb4600967a1d3476ee56946a108b25319446cd Mon Sep 17 00:00:00 2001 From: Suyog Tandel Date: Tue, 21 Jul 2026 15:35:12 +0530 Subject: [PATCH] ci: drop .deb and .tar.gz pkgs from releases --- .github/scripts/build_appimage.sh | 12 +++- .github/scripts/build_flatpak.sh | 0 .github/scripts/sync_spec_version.sh | 0 .github/workflows/release.yml | 95 +++++++++------------------- Cargo.toml | 3 - 5 files changed, 39 insertions(+), 71 deletions(-) mode change 100644 => 100755 .github/scripts/build_appimage.sh mode change 100644 => 100755 .github/scripts/build_flatpak.sh mode change 100644 => 100755 .github/scripts/sync_spec_version.sh diff --git a/.github/scripts/build_appimage.sh b/.github/scripts/build_appimage.sh old mode 100644 new mode 100755 index f81e26d..0a566df --- a/.github/scripts/build_appimage.sh +++ b/.github/scripts/build_appimage.sh @@ -75,6 +75,7 @@ verify_assets() { local binary="$1" local desktop="$2" local icon="$3" + local metainfo="$4" if [ ! -f "${binary}" ]; then echo "Error: Binary not found at ${binary}" @@ -88,6 +89,10 @@ verify_assets() { echo "Error: Icon file not found at ${icon}" exit 1 fi + if [ ! -f "${metainfo}" ]; then + echo "Error: Metainfo file not found at ${metainfo}" + exit 1 + fi } package_appimage() { @@ -95,6 +100,7 @@ package_appimage() { local binary="$2" local desktop="$3" local icon="$4" + local metainfo="$5" echo "Packaging AppImage using linuxdeploy..." export APPIMAGE_EXTRACT_AND_RUN=1 @@ -113,6 +119,7 @@ package_appimage() { --executable "${binary}" \ --desktop-file "${desktop}" \ --icon-file "${icon}" \ + --appdata-file "${metainfo}" \ --exclude-library libpcsclite.so.1 \ --output appimage } @@ -178,9 +185,10 @@ main() { local binary="target/release/picoforge" local desktop="data/in.suyogtandel.picoforge.desktop" local icon="static/appIcons/in.suyogtandel.picoforge.svg" + local metainfo="data/in.suyogtandel.picoforge.metainfo.xml" - verify_assets "${binary}" "${desktop}" "${icon}" - package_appimage "${output_name}" "${binary}" "${desktop}" "${icon}" + verify_assets "${binary}" "${desktop}" "${icon}" "${metainfo}" + package_appimage "${output_name}" "${binary}" "${desktop}" "${icon}" "${metainfo}" move_artifacts "${output_name}" cleanup print_summary "${output_name}" diff --git a/.github/scripts/build_flatpak.sh b/.github/scripts/build_flatpak.sh old mode 100644 new mode 100755 diff --git a/.github/scripts/sync_spec_version.sh b/.github/scripts/sync_spec_version.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81321b5..8e029fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,24 +22,10 @@ jobs: # MacOS Builds: - platform: "macos-latest" args: "--target aarch64-apple-darwin" - build_type: "standard" - platform: "macos-latest" args: "--target x86_64-apple-darwin" - build_type: "standard" - # Linux Builds: - - platform: "ubuntu-22.04" - args: "" - build_type: "standard" - - platform: "ubuntu-latest" - args: "" - build_type: "flatpak" - - platform: "ubuntu-24.04-arm" - args: "" - build_type: "standard" - - platform: "ubuntu-24.04-arm" - args: "" - build_type: "flatpak" + # Linux AppImage Builds (via container): - platform: "ubuntu-latest" appimage_variant: "glibc-2.28-x86_64" build_type: "appimage" @@ -53,16 +39,21 @@ jobs: appimage_variant: "musl-aarch64" build_type: "appimage" + # Linux Flatpak Builds: + - platform: "ubuntu-latest" + args: "" + build_type: "flatpak" + - platform: "ubuntu-24.04-arm" + args: "" + build_type: "flatpak" + # Windows Builds: - platform: "windows-latest" args: "--target x86_64-pc-windows-msvc" - build_type: "standard" - platform: "windows-latest" args: "--target i686-pc-windows-msvc" - build_type: "standard" - platform: "windows-latest" args: "--target aarch64-pc-windows-msvc" - build_type: "standard" runs-on: ${{ matrix.platform }} steps: @@ -71,7 +62,7 @@ jobs: fetch-depth: 0 - name: Install Rust stable - if: matrix.build_type == 'standard' + if: runner.os != 'Linux' uses: dtolnay/rust-toolchain@stable with: targets: > @@ -79,42 +70,11 @@ jobs: matrix.platform == 'windows-latest' && 'x86_64-pc-windows-msvc,i686-pc-windows-msvc,aarch64-pc-windows-msvc' || '' }} - name: Cache Cargo registry and target - if: matrix.build_type == 'standard' + if: runner.os != 'Linux' uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.platform }}-${{ matrix.args }} - - name: Install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm' - run: | - sudo apt-get update - sudo apt install -y \ - build-essential \ - pkg-config \ - libssl-dev \ - libpcsclite-dev \ - libudev-dev \ - libvulkan-dev \ - vulkan-tools \ - libwayland-dev \ - wayland-protocols \ - libxkbcommon-dev \ - libxcb1-dev \ - libxkbcommon-x11-dev \ - libfontconfig1-dev \ - libasound2-dev \ - libdbus-1-dev \ - file \ - desktop-file-utils \ - libx11-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev libusb-1.0-0-dev podman patchelf librsvg2-dev libappindicator3-dev libwebkit2gtk-4.1-dev - - - name: Install dependencies (ubuntu-arm64 only) - if: matrix.platform == 'ubuntu-24.04-arm' - run: | - sudo apt-get install xdg-utils - - name: Extract version from Cargo.toml id: get_version shell: bash @@ -125,31 +85,27 @@ jobs: echo "version=$version" >> $GITHUB_ENV - name: Install cargo-packager - if: matrix.build_type == 'standard' + if: runner.os != 'Linux' uses: taiki-e/install-action@v2 with: tool: cargo-packager - name: Build Binary - if: matrix.build_type == 'standard' + if: runner.os != 'Linux' run: cargo build --release ${{ matrix.args }} - name: Build and Package - if: matrix.platform != 'ubuntu-22.04' && matrix.platform != 'ubuntu-24.04-arm' && matrix.build_type == 'standard' + if: runner.os != 'Linux' run: cargo packager --release ${{ matrix.args }} - - name: Build and Package (Linux) - if: (matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-24.04-arm') && matrix.build_type == 'standard' - run: cargo packager --release --formats deb,pacman - - - name: Build AppImage (via Container) + - name: Build AppImage if: matrix.build_type == 'appimage' run: | IMAGE_NAME="ghcr.io/${{ github.repository_owner }}/picoforge-appimage-builder:${{ matrix.appimage_variant }}" echo "Pulling container: ${IMAGE_NAME}" podman pull "${IMAGE_NAME}" - mkdir -p target/release + chmod +x .github/scripts/build_appimage.sh echo "Running build inside container..." podman run --rm \ -e GITHUB_REPOSITORY_OWNER \ @@ -179,11 +135,9 @@ jobs: prerelease: false files: | *.flatpak - target/release/*.deb target/release/*.appimage target/release/*.AppImage target/release/*.zsync - target/release/*.tar.gz target/release/*.msi target/release/*.dmg target/release/*.app @@ -200,13 +154,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + sync-spec: + needs: build-and-release + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 - name: Sync Spec Version & Tag - if: matrix.platform == 'ubuntu-22.04' && matrix.build_type == 'standard' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | chmod +x .github/scripts/sync_spec_version.sh - podman run --rm \ --security-opt label=disable \ -v "$PWD":/workspace \ diff --git a/Cargo.toml b/Cargo.toml index 1e8e8d0..a8b659c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,3 @@ generate_desktop_entry = false excluded_libraries = ["libpcsclite*.so*"] files = { "data/in.suyogtandel.picoforge.desktop" = "usr/share/applications/in.suyogtandel.picoforge.desktop", "static/appIcons/in.suyogtandel.picoforge-symbolic.svg" = "usr/share/icons/hicolor/symbolic/apps/in.suyogtandel.picoforge-symbolic.svg", "static/appIcons/in.suyogtandel.picoforge.svg" = "usr/share/icons/hicolor/scalable/apps/in.suyogtandel.picoforge.svg" } -# NOTE: The paths for .deb packages needs to be verified not sure about these. -[package.metadata.packager.deb] -files = { "data/in.suyogtandel.picoforge.desktop" = "usr/share/applications/in.suyogtandel.picoforge.desktop", "static/appIcons/in.suyogtandel.picoforge-symbolic.svg" = "usr/share/icons/hicolor/symbolic/apps/in.suyogtandel.picoforge-symbolic.svg", "static/appIcons/in.suyogtandel.picoforge.svg" = "usr/share/icons/hicolor/scalable/apps/in.suyogtandel.picoforge.svg" }