Update icons directory path to include hicolor scalable apps subdirec… #22
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 and Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build-x86_64: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:41 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| dnf install -y \ | |
| meson \ | |
| ninja-build \ | |
| gcc \ | |
| vala \ | |
| glib2-devel \ | |
| gtk4-devel \ | |
| libadwaita-devel \ | |
| json-glib-devel \ | |
| libgee-devel \ | |
| libsoup3-devel \ | |
| libportal-devel \ | |
| libportal-gtk4-devel \ | |
| desktop-file-utils \ | |
| chrpath \ | |
| jq \ | |
| p7zip \ | |
| curl \ | |
| file \ | |
| fuse \ | |
| fuse-libs | |
| - name: Install appimagetool | |
| run: | | |
| curl -Lo /usr/local/bin/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" | |
| chmod +x /usr/local/bin/appimagetool | |
| # Extract appimagetool since FUSE may not work in container | |
| cd /tmp | |
| /usr/local/bin/appimagetool --appimage-extract | |
| mv squashfs-root appimagetool-extracted | |
| ln -sf /tmp/appimagetool-extracted/AppRun /usr/local/bin/appimagetool | |
| - name: Configure | |
| run: meson setup build --prefix=/usr -Dbundle_dwarfs=true | |
| - name: Build | |
| run: ninja -C build | |
| - name: Stage install tree | |
| run: | | |
| DESTDIR="${GITHUB_WORKSPACE}/dist-root" | |
| rm -rf "$DESTDIR" | |
| mkdir -p "$DESTDIR" | |
| meson install -C build --destdir "$DESTDIR" | |
| - name: Capture project version | |
| id: meta | |
| run: | | |
| VERSION=$(meson introspect build --projectinfo | jq -r '.version') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Build AppImage | |
| env: | |
| VERSION: ${{ steps.meta.outputs.version }} | |
| run: | | |
| set -euo pipefail | |
| DESTDIR="${GITHUB_WORKSPACE}/dist-root" | |
| PACKAGE_DIR="${GITHUB_WORKSPACE}/packages" | |
| APPDIR="${GITHUB_WORKSPACE}/AppDir" | |
| rm -rf "$APPDIR" | |
| mkdir -p "$APPDIR" | |
| mkdir -p "$PACKAGE_DIR" | |
| # Copy installed files | |
| cp -a "$DESTDIR/usr" "$APPDIR/" | |
| # Create AppRun script | |
| printf '%s\n' '#!/bin/bash' \ | |
| 'HERE="$(dirname "$(readlink -f "$0")")"' \ | |
| 'export APPDIR="$HERE"' \ | |
| 'export GSETTINGS_SCHEMA_DIR="$HERE/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR:-}"' \ | |
| 'export XDG_DATA_DIRS="$HERE/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"' \ | |
| 'export PATH="$HERE/usr/bin:$PATH"' \ | |
| 'exec "$HERE/usr/bin/app-manager" "$@"' > "$APPDIR/AppRun" | |
| chmod +x "$APPDIR/AppRun" | |
| # Desktop and icon at AppDir root | |
| install -Dm644 "$DESTDIR/usr/share/applications/com.github.AppManager.desktop" "$APPDIR/com.github.AppManager.desktop" | |
| install -Dm644 "$DESTDIR/usr/share/icons/hicolor/scalable/apps/com.github.AppManager.svg" "$APPDIR/com.github.AppManager.svg" | |
| # Validate desktop file | |
| desktop-file-validate "$APPDIR/com.github.AppManager.desktop" || true | |
| # Remove rpath if present | |
| chrpath -d "$APPDIR/usr/bin/app-manager" 2>/dev/null || true | |
| # Build AppImage | |
| ARCH=x86_64 appimagetool "$APPDIR" "$PACKAGE_DIR/AppManager-${VERSION}-x86_64.AppImage" | |
| - name: Upload release packages | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| packages/AppManager-${{ steps.meta.outputs.version }}-x86_64.AppImage | |
| - name: Upload artifacts (for non-release builds) | |
| if: "!startsWith(github.ref, 'refs/tags/')" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-x86_64 | |
| path: packages/* | |
| build-aarch64: | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: fedora:41 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| dnf install -y \ | |
| meson \ | |
| ninja-build \ | |
| gcc \ | |
| vala \ | |
| glib2-devel \ | |
| gtk4-devel \ | |
| libadwaita-devel \ | |
| json-glib-devel \ | |
| libgee-devel \ | |
| libsoup3-devel \ | |
| libportal-devel \ | |
| libportal-gtk4-devel \ | |
| desktop-file-utils \ | |
| chrpath \ | |
| jq \ | |
| p7zip \ | |
| curl \ | |
| file \ | |
| fuse \ | |
| fuse-libs | |
| - name: Install appimagetool | |
| run: | | |
| curl -Lo /usr/local/bin/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage" | |
| chmod +x /usr/local/bin/appimagetool | |
| # Extract appimagetool since FUSE may not work in container | |
| cd /tmp | |
| /usr/local/bin/appimagetool --appimage-extract | |
| mv squashfs-root appimagetool-extracted | |
| ln -sf /tmp/appimagetool-extracted/AppRun /usr/local/bin/appimagetool | |
| - name: Configure | |
| run: meson setup build --prefix=/usr -Dbundle_dwarfs=true | |
| - name: Build | |
| run: ninja -C build | |
| - name: Stage install tree | |
| run: | | |
| DESTDIR="${GITHUB_WORKSPACE}/dist-root" | |
| rm -rf "$DESTDIR" | |
| mkdir -p "$DESTDIR" | |
| meson install -C build --destdir "$DESTDIR" | |
| - name: Capture project version | |
| id: meta | |
| run: | | |
| VERSION=$(meson introspect build --projectinfo | jq -r '.version') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Build AppImage | |
| env: | |
| VERSION: ${{ steps.meta.outputs.version }} | |
| run: | | |
| set -euo pipefail | |
| DESTDIR="${GITHUB_WORKSPACE}/dist-root" | |
| PACKAGE_DIR="${GITHUB_WORKSPACE}/packages" | |
| APPDIR="${GITHUB_WORKSPACE}/AppDir" | |
| rm -rf "$APPDIR" | |
| mkdir -p "$APPDIR" | |
| mkdir -p "$PACKAGE_DIR" | |
| # Copy installed files | |
| cp -a "$DESTDIR/usr" "$APPDIR/" | |
| # Create AppRun script | |
| printf '%s\n' '#!/bin/bash' \ | |
| 'HERE="$(dirname "$(readlink -f "$0")")"' \ | |
| 'export APPDIR="$HERE"' \ | |
| 'export GSETTINGS_SCHEMA_DIR="$HERE/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR:-}"' \ | |
| 'export XDG_DATA_DIRS="$HERE/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"' \ | |
| 'export PATH="$HERE/usr/bin:$PATH"' \ | |
| 'exec "$HERE/usr/bin/app-manager" "$@"' > "$APPDIR/AppRun" | |
| chmod +x "$APPDIR/AppRun" | |
| # Desktop and icon at AppDir root | |
| install -Dm644 "$DESTDIR/usr/share/applications/com.github.AppManager.desktop" "$APPDIR/com.github.AppManager.desktop" | |
| install -Dm644 "$DESTDIR/usr/share/icons/hicolor/scalable/apps/com.github.AppManager.svg" "$APPDIR/com.github.AppManager.svg" | |
| # Validate desktop file | |
| desktop-file-validate "$APPDIR/com.github.AppManager.desktop" || true | |
| # Remove rpath if present | |
| chrpath -d "$APPDIR/usr/bin/app-manager" 2>/dev/null || true | |
| # Build AppImage | |
| ARCH=aarch64 appimagetool "$APPDIR" "$PACKAGE_DIR/AppManager-${VERSION}-aarch64.AppImage" | |
| - name: Upload release packages | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| packages/AppManager-${{ steps.meta.outputs.version }}-aarch64.AppImage | |
| - name: Upload artifacts (for non-release builds) | |
| if: "!startsWith(github.ref, 'refs/tags/')" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages-aarch64 | |
| path: packages/* |