Repository navigation
55 lines (46 loc) · 1.79 KB
/
Copy pathflatpak.yml
File metadata and controls
55 lines (46 loc) · 1.79 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
name: Flatpak
on:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
jobs:
build-flatpak:
name: Build Flatpak
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-50
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install flatpak-cargo-generator
run: |
pip install aiohttp toml tomlkit
- name: Generate cargo sources
run: |
# Pinned commit + checksum: this script shapes which sources end
# up in the Flatpak build (supply-chain hygiene)
FBT_COMMIT=737c0085912f9f7dabf9341d4608e2a77a51a73a
FBT_SHA256=b373c8ab1a05378ec5d8ed0645c7b127bcec7d2f7a1798694fbc627d570d856c
wget -q "https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/${FBT_COMMIT}/cargo/flatpak-cargo-generator.py"
echo "${FBT_SHA256} flatpak-cargo-generator.py" | sha256sum -c -
chmod +x flatpak-cargo-generator.py
python3 flatpak-cargo-generator.py Cargo.lock -o packaging/flatpak/cargo-sources.json
cp packaging/flatpak/cargo-sources.json packaging/flathub/cargo-sources.json
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
manifest-path: packaging/flatpak/io.github.totoshko88.RustConn.yml
bundle: RustConn.flatpak
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
env:
# Retry network downloads up to 3 times (e.g. transient GitLab 500)
FLATPAK_BUILDER_N_TRIES: 3
- name: Upload Flatpak artifact
uses: actions/upload-artifact@v6
with:
name: flatpak
path: RustConn.flatpak