-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 3.02 KB
/
flatpak-test.yml
File metadata and controls
83 lines (71 loc) · 3.02 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: flatpak-test
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build-flatpak:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
lfs: true
- name: Checkout Flathub manifest repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: Open-VCS/flathub
path: flathub
ref: OpenVCS
- name: Cache Flatpak SDK and build
uses: actions/cache@v5
with:
path: |
~/.local/share/flatpak
.flatpak-builder
key: flatpak-${{ runner.os }}-${{ hashFiles('Cargo.lock', 'Frontend/package-lock.json', 'flathub/app.openvcs.OpenVCS.yml') }}
restore-keys: flatpak-${{ runner.os }}-
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: Frontend/package-lock.json
- name: Install frontend deps
working-directory: Frontend
run: npm ci
- name: Build frontend
working-directory: Frontend
run: npm run build
- name: Install Linux build deps
shell: bash
run: |
set -euxo pipefail
sudo apt-get update
sudo apt-get install -y libappindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev
- name: Install Flatpak tooling
shell: bash
run: |
set -euxo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends flatpak flatpak-builder appstream elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.gnome.Platform//49 org.gnome.Sdk//49
flatpak install --user -y flathub org.freedesktop.Sdk.Extension.rust-stable//25.08 \
|| flatpak install --user -y flathub org.freedesktop.Sdk.Extension.rust-stable//24.08 \
|| flatpak install --user -y flathub org.freedesktop.Sdk.Extension.rust-stable
flatpak install --user -y flathub org.freedesktop.Sdk.Extension.node24//25.08 \
|| flatpak install --user -y flathub org.freedesktop.Sdk.Extension.node24//24.08
- name: Build Flatpak bundle
shell: bash
run: |
set -euxo pipefail
yq eval '(.modules[] | select(.name == "openvcs-backend") | ."build-options".env.OPENVCS_OFFICIAL_RELEASE) = "1"' -i flathub/app.openvcs.OpenVCS.yml
flatpak-builder --user --force-clean --repo=repo build-flatpak flathub/app.openvcs.OpenVCS.yml
flatpak build-bundle repo OpenVCS-test.flatpak app.openvcs.OpenVCS
- name: Upload Flatpak artifact
uses: actions/upload-artifact@v7
with:
name: OpenVCS-flatpak-test
path: OpenVCS-test.flatpak