Skip to content

Commit

Permalink
CI: Update Flatpak AppStream validation
Browse files Browse the repository at this point in the history
Also add AppStream validation to Build Project workflow
  • Loading branch information
tytan652 authored and GeorgesStavracas committed Feb 23, 2024
1 parent 63eef36 commit 409bd12
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 409bd12

Please sign in to comment.