Skip to content

Commit

Permalink
Merge pull request #384 from jmlich/flatpak-ci
Browse files Browse the repository at this point in the history
Add flatpak into CI
  • Loading branch information
piggz authored Aug 26, 2024
2 parents 5676245 + 16abde7 commit 8f267e1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Flatpak Build

on: [push, pull_request]

jobs:
build-linux-flatpak-dev:
runs-on: ubuntu-24.04
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
path: harbour-amazfish
submodules: true

- uses: actions/checkout@v4
with:
path: uk.co.piggz.amazfish
repository: flathub/uk.co.piggz.amazfish

- name: Set up Ubuntu runner
run: sudo apt-get --quiet update --yes

- name: Install Flatpak and flatpak-builder
run: sudo apt-get --quiet install --yes flatpak flatpak-builder

- name: Add the Flathub repository
run: sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

- name: Install KDE SDK
run: sudo flatpak install -y flathub org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08

- name: Use dir instead of git tag in flatpak json
run: |
jq 'walk(if type == "object" and .url == "https://github.com/piggz/harbour-amazfish.git" then .type = "dir" | .path = "../harbour-amazfish" | del(.url, .branch, .commit, .tag) else . end)' ${{ github.workspace }}/uk.co.piggz.amazfish/uk.co.piggz.amazfish.json > ${{ github.workspace }}/uk.co.piggz.amazfish/uk.co.piggz.amazfish-ci.json
- name: Build development snapshot and package as Flatpak
run: |
cd ${{ github.workspace }}/uk.co.piggz.amazfish
flatpak-builder --repo=${{ github.workspace }}/repo --verbose --force-clean --ccache ${{ github.workspace }}/_build ${{ github.workspace }}/uk.co.piggz.amazfish/uk.co.piggz.amazfish-ci.json
- name: Export Flatpak as single file bundle
run: |
flatpak build-bundle ${{ github.workspace }}/repo ${{ github.workspace }}/uk.co.piggz.amazfish.flatpak uk.co.piggz.amazfish
- name: Upload Flatpak
uses: actions/upload-artifact@v2
with:
name: uk.co.piggz.amazfish.flatpak
path: uk.co.piggz.amazfish.flatpak
1 change: 1 addition & 0 deletions .github/workflows/sailfishos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
name: Build App
strategy:
matrix:
Expand Down

0 comments on commit 8f267e1

Please sign in to comment.