Skip to content

Commit 13d1ff6

Browse files
committed
CI: Update AppStream validation
Also add AppStream validation to Build Project workflow
1 parent 3820b33 commit 13d1ff6

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/build-project.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ jobs:
244244
defaults:
245245
run:
246246
shell: bash
247+
env:
248+
FLATPAK_BUILD_SHARE_PATH: flatpak_app/files/share
247249
container:
248250
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.6
249251
options: --privileged
@@ -298,6 +300,19 @@ jobs:
298300
cache-key: ${{ steps.setup.outputs.cacheKey }}
299301
mirror-screenshots-url: https://dl.flathub.org/media
300302

303+
- name: Validate AppStream
304+
uses: ./.github/actions/flatpak-builder-lint
305+
with:
306+
artifact: appstream
307+
path: ${{ env.FLATPAK_BUILD_SHARE_PATH }}/metainfo/com.obsproject.Studio.appdata.xml
308+
309+
- name: Verify Icon and Metadata in app-info
310+
working-directory: ${{ env.FLATPAK_BUILD_SHARE_PATH }}
311+
run: |
312+
: Verify Icon and Metadata in app-info
313+
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; }
314+
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "::error::Missing com.obsproject.Studio.xml.gz in app-info"; exit 1; }
315+
301316
- name: Validate build directory
302317
uses: ./.github/actions/flatpak-builder-lint
303318
with:

.github/workflows/publish.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run:
5050
shell: bash
5151
env:
52-
FLATPAK_BUILD_PATH: flatpak_app/files/share
52+
FLATPAK_BUILD_SHARE_PATH: flatpak_app/files/share
5353
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
5454
TWITCH_HASH: ${{ secrets.TWITCH_HASH }}
5555
RESTREAM_CLIENTID: ${{ secrets.RESTREAM_CLIENTID }}
@@ -114,17 +114,17 @@ jobs:
114114
branch: ${{ matrix.branch }}
115115

116116
- name: Validate AppStream
117-
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
118-
run: |
119-
: Validate AppStream
120-
appstream-util validate appdata/com.obsproject.Studio.appdata.xml
117+
uses: ./.github/actions/flatpak-builder-lint
118+
with:
119+
artifact: appstream
120+
path: ${{ env.FLATPAK_BUILD_SHARE_PATH }}/metainfo/com.obsproject.Studio.appdata.xml
121121

122122
- name: Verify Icon and Metadata in app-info
123-
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
123+
working-directory: ${{ env.FLATPAK_BUILD_SHARE_PATH }}
124124
run: |
125125
: Verify Icon and Metadata in app-info
126-
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info!"; exit 1; }
127-
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info!"; exit 1; }
126+
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; }
127+
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "::error::Missing com.obsproject.Studio.xml.gz in app-info"; exit 1; }
128128
129129
- name: Validate build directory
130130
uses: ./.github/actions/flatpak-builder-lint

0 commit comments

Comments
 (0)