Skip to content

Commit

Permalink
ci: Validate Flatpak with flatpak-builder-linter
Browse files Browse the repository at this point in the history
Validate the Flatpak manifest before building it; then, validate
the build directory; and when publishing, validate the repository
as well.
  • Loading branch information
GeorgesStavracas committed Oct 29, 2023
1 parent e0b3456 commit 3d0bdab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ jobs:
echo "cacheKey=${cache_key}" >> $GITHUB_OUTPUT
- name: Validate Flatpak manifest
run: |
: Validate Flatpak manifest
ls -la .
echo "Listing build-aux"
ls -la ./build-aux/
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest ./build-aux/com.obsproject.Studio.json
- name: Build Flatpak Manifest 🧾
uses: flatpak/flatpak-github-actions/flatpak-builder@0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf
with:
Expand All @@ -296,6 +304,11 @@ jobs:
restore-cache: ${{ fromJSON(steps.setup.outputs.cacheHit) }}
cache-key: ${{ steps.setup.outputs.cacheKey }}

- name: Validate build directory
run: |
: Validate build directory
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest builddir flatpak_app
windows-build:
name: Windows 🪟
runs-on: windows-2022
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ jobs:
echo "cacheKey=${cache_key}" >> $GITHUB_OUTPUT
echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
- name: Validate Flatpak manifest
run: |
: Validate Flatpak manifest
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest build-aux/com.obsproject.Studio.json
- name: Build Flatpak Manifest
uses: flatpak/flatpak-github-actions/flatpak-builder@0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf
with:
Expand Down Expand Up @@ -126,6 +131,16 @@ jobs:
: Commit Screenshots to OSTree Repository
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
- name: Validate build directory
run: |
: Validate build directory
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest builddir flatpak_app
- name: Validate repository
run: |
: Validate repository
flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo
- name: Publish to Flathub Beta
uses: flatpak/flatpak-github-actions/flat-manager@0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf
if: ${{ matrix.branch == 'beta' }}
Expand Down

0 comments on commit 3d0bdab

Please sign in to comment.