From 802081c3f80cd0b8a2cb7da367b344338b798ef0 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 28 Oct 2023 18:32:23 +1000 Subject: [PATCH] CI/Flatpak: Validate build before pushing --- .github/workflows/linux_build_flatpak.yml | 12 ++++++++++++ .../scripts/linux/install-packages-flatpak.sh | 3 +++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/linux_build_flatpak.yml b/.github/workflows/linux_build_flatpak.yml index 257b74a5d7acd..7c523fd686c94 100644 --- a/.github/workflows/linux_build_flatpak.yml +++ b/.github/workflows/linux_build_flatpak.yml @@ -85,6 +85,10 @@ jobs: cat .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml flatpak run org.freedesktop.appstream-glib validate .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml + - name: Validate manifest + run: | + flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json + - name: Build Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3 with: @@ -103,6 +107,14 @@ jobs: run: | ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots + - name: Validate build directory + run: | + flatpak run --command=flatpak-builder-lint org.flatpak.Builder builddir flatpak_app + + - name: Validate repo + run: | + flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo + - name: Push to Flathub beta if: inputs.publish == true && inputs.branch == 'beta' uses: flatpak/flatpak-github-actions/flat-manager@v6.3 diff --git a/.github/workflows/scripts/linux/install-packages-flatpak.sh b/.github/workflows/scripts/linux/install-packages-flatpak.sh index 2d68ddff39915..ccbbd86a2ce79 100755 --- a/.github/workflows/scripts/linux/install-packages-flatpak.sh +++ b/.github/workflows/scripts/linux/install-packages-flatpak.sh @@ -46,6 +46,9 @@ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub echo "Will install the following packages for building - ${FLATPAK_PACKAGES[*]}" retry_command sudo flatpak -y install "${FLATPAK_PACKAGES[@]}" +echo "Installing Flatpak Builder" +retry_command sudo flatpak -y install flathub org.flatpak.builder + echo "Downloading flat-manager-client" mkdir -p "$FLAT_MANAGER_CLIENT_DIR" pushd "$FLAT_MANAGER_CLIENT_DIR"