-
-
Notifications
You must be signed in to change notification settings - Fork 18
63 lines (51 loc) · 2.16 KB
/
flatpak.yml
File metadata and controls
63 lines (51 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
on:
push:
tags: [ v*.*.* ]
workflow_dispatch:
concurrency:
group: flatpak
cancel-in-progress: true
permissions:
contents: write
jobs:
build-and-dist:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install Flatpak & Builder
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder
- name: Add Flathub remote
run: |
flatpak --user remote-add --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
# Required to pull SDK/runtime deps
- name: Build & run Meson dist in sandbox
run: |
# Perform a clean build, installing deps from Flathub into 'build' dir
flatpak-builder --user \
--force-clean \
--install-deps-from=flathub \
--repo=repo \
--keep-build-dirs \
build \
build-aux/com.ranfdev.Geopard.Devel.json
# Test the build
flatpak-builder --run build build-aux/com.ranfdev.Geopard.Devel.json ninja test "-C.flatpak-builder/build/geopard/_flatpak_build"
# Spawn a shell inside the build sandbox and run `meson dist`
flatpak-builder --run build build-aux/com.ranfdev.Geopard.Devel.json meson dist --no-tests "-C.flatpak-builder/build/geopard/_flatpak_build"
# `--run` spawns the build sandbox and executes the given command
- name: Upload Meson distribution artifact
uses: actions/upload-artifact@v4
with:
name: meson-dist
path: '.flatpak-builder/build/geopard/_flatpak_build/meson-dist/*.tar.xz'
- name: Create or update GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }} # defaults to this if omitted
name: Release ${{ github.ref_name }} # defaults to tag name if omitted
files: '.flatpak-builder/build/geopard/_flatpak_build/meson-dist/*.tar.xz'
generate_release_notes: true # optional: auto-generate notes