Add flatpak into CI #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flatpak Build | |
on: [push, pull_request] | |
jobs: | |
build-linux-flatpak-dev: | |
runs-on: ubuntu-24.04 | |
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 20.04 runner | |
run: sudo apt-get --quiet update --yes | |
- 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 = ".." | 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: 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: 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 |