CI/Flatpak: Validate build before pushing

This commit is contained in:
Stenzek 2023-10-28 18:32:23 +10:00 committed by Connor McLaughlin
parent 2a2cd0dbca
commit 802081c3f8
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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"