-
Notifications
You must be signed in to change notification settings - Fork 119
65 lines (57 loc) · 1.87 KB
/
flatpak.yml
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
name: Flatpak Packages
on:
push:
branches:
- main
- "releases/**"
pull_request:
branches:
- main
- "releases/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build Flatpaks"
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.6
options: --privileged
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
path: src
sparse-checkout: |
linux/flatpak
Cargo.lock
- name: Checkout tools
uses: actions/checkout@v4
with:
repository: oskirby/flatpak-builder-tools
ref: pip-fix-case-sensitivity
path: tools
- name: Install pip tools
shell: bash
run: pip install requirements-parser PyYAML toml yq
- name: Update Cargo dependencies
shell: bash
working-directory: src
run: |
../tools/cargo/flatpak-cargo-generator.py -o flatpak-sources-cargo.json Cargo.lock
cat flatpak-sources-cargo.json | yq -y > linux/flatpak/flatpak-vpn-crates.yaml
- name: Update git reference
shell: bash
working-directory: src/linux/flatpak
run: |
yq -yi 'del(.modules[-1].sources[0].branch)' org.mozilla.vpn.yml
yq -yi ".modules[-1].sources[0].url = \"https://github.com/${{ github.repository }}\"" org.mozilla.vpn.yml
yq -yi ".modules[-1].sources[0].commit = \"${{ github.sha }}\"" org.mozilla.vpn.yml
cat org.mozilla.vpn.yml
- name: Build
uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
with:
bundle: mozillavpn.flatpak
manifest-path: src/linux/flatpak/org.mozilla.vpn.yml
cache-key: flatpak-builder-${{ github.sha }}