Skip to content

Draft: Add flatpak into CI #3

Draft: Add flatpak into CI

Draft: Add flatpak into CI #3

Workflow file for this run

name: Flatpak Build
on: [push, pull_request]
jobs:
build-linux-flatpak-dev:
runs-on: ubuntu-20.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" and .branch == "master" then .type = "git" | .dir = "../harbour-amazfish" | del(.url, .branch) 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