From 3d80d94724e36808d718658369508555684d5749 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Fri, 23 Feb 2024 10:37:20 +0100 Subject: [PATCH] CI: Update Flatpak AppStream validation Also add AppStream validation to Build Project workflow --- .github/workflows/build-project.yaml | 15 +++++++++++++++ .github/workflows/publish.yaml | 16 ++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index a9dd34194bd6f5..41d11aa0b407e4 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -244,6 +244,8 @@ jobs: defaults: run: shell: bash + env: + FLATPAK_BUILD_SHARE_PATH: flatpak_app/files/share container: image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.6 options: --privileged @@ -298,6 +300,19 @@ jobs: cache-key: ${{ steps.setup.outputs.cacheKey }} mirror-screenshots-url: https://dl.flathub.org/media + - name: Validate AppStream + uses: ./.github/actions/flatpak-builder-lint + with: + artifact: appstream + path: ${{ env.FLATPAK_BUILD_SHARE_PATH }}/metainfo/com.obsproject.Studio.metainfo.xml + + - name: Verify Icon and Metadata in app-info + working-directory: ${{ env.FLATPAK_BUILD_SHARE_PATH }} + run: | + : Verify Icon and Metadata in app-info + test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; } + test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "::error::Missing com.obsproject.Studio.xml.gz in app-info"; exit 1; } + - name: Validate build directory uses: ./.github/actions/flatpak-builder-lint with: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fc98164f1094df..16c371b0f5015a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -49,7 +49,7 @@ jobs: run: shell: bash env: - FLATPAK_BUILD_PATH: flatpak_app/files/share + FLATPAK_BUILD_SHARE_PATH: flatpak_app/files/share TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }} TWITCH_HASH: ${{ secrets.TWITCH_HASH }} RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }} @@ -114,17 +114,17 @@ jobs: branch: ${{ matrix.branch }} - name: Validate AppStream - working-directory: ${{ env.FLATPAK_BUILD_PATH }} - run: | - : Validate AppStream - appstream-util validate appdata/com.obsproject.Studio.appdata.xml + uses: ./.github/actions/flatpak-builder-lint + with: + artifact: appstream + path: ${{ env.FLATPAK_BUILD_SHARE_PATH }}/metainfo/com.obsproject.Studio.metainfo.xml - name: Verify Icon and Metadata in app-info - working-directory: ${{ env.FLATPAK_BUILD_PATH }} + working-directory: ${{ env.FLATPAK_BUILD_SHARE_PATH }} run: | : Verify Icon and Metadata in app-info - test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info!"; exit 1; } - test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info!"; exit 1; } + test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; } + test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "::error::Missing com.obsproject.Studio.xml.gz in app-info"; exit 1; } - name: Validate build directory uses: ./.github/actions/flatpak-builder-lint