Skip to content

Commit

Permalink
ci: Simplify Flatpak bundle workflow
Browse files Browse the repository at this point in the history
We can use the Flatpak Github action directly
  • Loading branch information
GeorgesStavracas committed Sep 5, 2023
1 parent a9781ee commit fe7a779
Showing 1 changed file with 7 additions and 42 deletions.
49 changes: 7 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,15 @@ jobs:
name: Flatpak
runs-on: ubuntu-latest

container:
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -y install \
flatpak \
flatpak-builder \
xvfb
- name: Cache flatpak user installation
uses: actions/cache@v3
with:
path: ~/.local/share/flatpak
key: flatpak-user-${{ runner.arch }}

- name: Cache flatpak-builder state directory
uses: actions/cache@v3
with:
path: .flatpak-builder
key: flatpak-builder-${{ runner.arch }}

- name: Add Flathub repository
run: |
flatpak remote-add --user --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
- name: Build flatpak
# The build needs to be run under Xvfb (or some other virtual
# display server) so that Gdk initialization succeeds in the
# tests.
run: |
xvfb-run --auto-servernum -- \
flatpak-builder --user --install-deps-from=flathub --repo _repo _flatpak \
build-aux/flatpak/org.endlessos.Key.Devel.json
- name: Create flatpak bundle
run: |
flatpak build-bundle _repo endless-key-devel.flatpak org.endlessos.Key.Devel
- name: Upload flatpak bundle
uses: actions/upload-artifact@v3
- uses: flatpak/flatpak-github-actions/[email protected]
with:
name: flatpak
path: endless-key-devel.flatpak
bundle: org.endlessos.Key.Devel.flatpak
manifest-path: build-aux/flatpak/org.endlessos.Key.Devel.json

0 comments on commit fe7a779

Please sign in to comment.