-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Simplify Flatpak bundle workflow
We can use the Flatpak Github action directly
- Loading branch information
1 parent
a9781ee
commit fe7a779
Showing
1 changed file
with
7 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |