Skip to content

Commit 808b994

Browse files
committed
flatpak
1 parent 732028e commit 808b994

7 files changed

Lines changed: 143 additions & 30 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build Flatpak
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-flatpak:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
15+
options: --privileged
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Get Flutter SHA256
22+
id: flutter-hash
23+
run: |
24+
FLUTTER_URL="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.1-stable.tar.xz"
25+
FLUTTER_SHA256=$(curl -sL "$FLUTTER_URL" | sha256sum | cut -d' ' -f1)
26+
echo "sha256=$FLUTTER_SHA256" >> $GITHUB_OUTPUT
27+
echo "Flutter SHA256: $FLUTTER_SHA256"
28+
29+
- name: Update manifest with Flutter SHA256
30+
run: |
31+
sed -i "s/FLUTTER_SHA256/${{ steps.flutter-hash.outputs.sha256 }}/" dev.xmit.bob.yaml
32+
33+
- name: Build Flatpak
34+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
35+
with:
36+
bundle: bob-x86_64.flatpak
37+
manifest-path: dev.xmit.bob.yaml
38+
cache-key: flatpak-builder-x86_64-${{ github.sha }}
39+
arch: x86_64
40+
41+
- name: Upload Flatpak bundle
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: bob-flatpak-x86_64
45+
path: bob-x86_64.flatpak
46+
retention-days: 30

‎.github/workflows/build-macos.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
run: flutter analyze
3030

3131
- name: Build macOS app
32-
run: dart run dmg --no-sign --no-notarization
32+
run: flutter build macos --release

‎dev.xmit.bob.desktop‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Name=Oncle Bob
3+
Comment=Start, build, preview, launch static websites
4+
Exec=bob
5+
Icon=dev.xmit.bob
6+
Terminal=false
7+
Type=Application
8+
Categories=Development;Utility;
9+
StartupNotify=true
10+
StartupWMClass=bob

‎dev.xmit.bob.metainfo.xml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>dev.xmit.bob</id>
4+
<metadata_license>0BSD</metadata_license>
5+
<project_license>0BSD</project_license>
6+
<name>Bob</name>
7+
<summary>Oncle Bob builds and launches web apps</summary>
8+
<description>
9+
<p>
10+
Bob is a utility application that helps you build and launch web applications.
11+
</p>
12+
</description>
13+
<launchable type="desktop-id">dev.xmit.bob.desktop</launchable>
14+
<provides>
15+
<binary>bob</binary>
16+
</provides>
17+
<releases>
18+
<release version="0.0.2" date="2024-11-18"/>
19+
</releases>
20+
<content_rating type="oars-1.1"/>
21+
</component>

‎dev.xmit.bob.yaml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
app-id: dev.xmit.bob
2+
runtime: org.freedesktop.Platform
3+
runtime-version: "23.08"
4+
sdk: org.freedesktop.Sdk
5+
command: bob
6+
7+
finish-args:
8+
- --share=ipc
9+
- --socket=wayland
10+
- --socket=fallback-x11
11+
- --device=dri
12+
- --share=network
13+
- --filesystem=host
14+
15+
modules:
16+
- name: bob
17+
buildsystem: simple
18+
build-commands:
19+
- tar xf flutter-*.tar.xz
20+
- export PATH="$PWD/flutter/bin:$PATH"
21+
- flutter config --no-analytics
22+
- flutter doctor
23+
- flutter pub get
24+
- flutter build linux --release
25+
- mkdir -p /app/bin
26+
- |
27+
if [ -d "build/linux/x64/release/bundle" ]; then
28+
cp -r build/linux/x64/release/bundle/* /app/bin/
29+
elif [ -d "build/linux/arm64/release/bundle" ]; then
30+
cp -r build/linux/arm64/release/bundle/* /app/bin/
31+
else
32+
echo "Error: Could not find release bundle"; exit 1
33+
fi
34+
- ln -s /app/bin/bob /app/bin/dev.xmit.bob
35+
- install -Dm644 dev.xmit.bob.desktop /app/share/applications/dev.xmit.bob.desktop
36+
- install -Dm644 dist/app_icon_256.png /app/share/icons/hicolor/256x256/apps/dev.xmit.bob.png
37+
- install -Dm644 dev.xmit.bob.metainfo.xml /app/share/metainfo/dev.xmit.bob.metainfo.xml
38+
39+
sources:
40+
- type: archive
41+
url: https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.1-stable.tar.xz
42+
sha256: FLUTTER_SHA256
43+
44+
- type: dir
45+
path: .

‎pubspec.lock‎

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ packages:
7777
dependency: transitive
7878
description:
7979
name: cross_file
80-
sha256: "942a4791cd385a68ccb3b32c71c427aba508a1bb949b86dff2adbe4049f16239"
80+
sha256: "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608"
8181
url: "https://pub.dev"
8282
source: hosted
83-
version: "0.3.5"
83+
version: "0.3.5+1"
8484
crypto:
8585
dependency: "direct main"
8686
description:
@@ -113,14 +113,6 @@ packages:
113113
url: "https://pub.dev"
114114
source: hosted
115115
version: "2.1.1"
116-
dmg:
117-
dependency: "direct dev"
118-
description:
119-
name: dmg
120-
sha256: "59c535415f452d69bcab7499076a9e23636dcee38ced419e2798c90f8a2f1899"
121-
url: "https://pub.dev"
122-
source: hosted
123-
version: "0.1.7"
124116
fake_async:
125117
dependency: transitive
126118
description:
@@ -340,18 +332,18 @@ packages:
340332
dependency: transitive
341333
description:
342334
name: path_provider_android
343-
sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16
335+
sha256: "95c68a74d3cab950fd0ed8073d9fab15c1c06eb1f3eec68676e87aabc9ecee5a"
344336
url: "https://pub.dev"
345337
source: hosted
346-
version: "2.2.20"
338+
version: "2.2.21"
347339
path_provider_foundation:
348340
dependency: transitive
349341
description:
350342
name: path_provider_foundation
351-
sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738
343+
sha256: "97390a0719146c7c3e71b6866c34f1cde92685933165c1c671984390d2aca776"
352344
url: "https://pub.dev"
353345
source: hosted
354-
version: "2.4.3"
346+
version: "2.4.4"
355347
path_provider_linux:
356348
dependency: transitive
357349
description:
@@ -428,18 +420,18 @@ packages:
428420
dependency: transitive
429421
description:
430422
name: shared_preferences_android
431-
sha256: "34266009473bf71d748912da4bf62d439185226c03e01e2d9687bc65bbfcb713"
423+
sha256: "07d552dbe8e71ed720e5205e760438ff4ecfb76ec3b32ea664350e2ca4b0c43b"
432424
url: "https://pub.dev"
433425
source: hosted
434-
version: "2.4.15"
426+
version: "2.4.16"
435427
shared_preferences_foundation:
436428
dependency: transitive
437429
description:
438430
name: shared_preferences_foundation
439-
sha256: "1c33a907142607c40a7542768ec9badfd16293bac51da3a4482623d15845f88b"
431+
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
440432
url: "https://pub.dev"
441433
source: hosted
442-
version: "2.5.5"
434+
version: "2.5.6"
443435
shared_preferences_linux:
444436
dependency: transitive
445437
description:
@@ -553,34 +545,34 @@ packages:
553545
dependency: transitive
554546
description:
555547
name: url_launcher_android
556-
sha256: "5c8b6c2d89a78f5a1cca70a73d9d5f86c701b36b42f9c9dac7bad592113c28e9"
548+
sha256: dff5e50339bf30b06d7950b50fda58164d3d8c40042b104ed041ddc520fbff28
557549
url: "https://pub.dev"
558550
source: hosted
559-
version: "6.3.24"
551+
version: "6.3.25"
560552
url_launcher_ios:
561553
dependency: transitive
562554
description:
563555
name: url_launcher_ios
564-
sha256: "6b63f1441e4f653ae799166a72b50b1767321ecc263a57aadf825a7a2a5477d9"
556+
sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad
565557
url: "https://pub.dev"
566558
source: hosted
567-
version: "6.3.5"
559+
version: "6.3.6"
568560
url_launcher_linux:
569561
dependency: transitive
570562
description:
571563
name: url_launcher_linux
572-
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
564+
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
573565
url: "https://pub.dev"
574566
source: hosted
575-
version: "3.2.1"
567+
version: "3.2.2"
576568
url_launcher_macos:
577569
dependency: transitive
578570
description:
579571
name: url_launcher_macos
580-
sha256: "8262208506252a3ed4ff5c0dc1e973d2c0e0ef337d0a074d35634da5d44397c9"
572+
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
581573
url: "https://pub.dev"
582574
source: hosted
583-
version: "3.2.4"
575+
version: "3.2.5"
584576
url_launcher_platform_interface:
585577
dependency: transitive
586578
description:
@@ -601,10 +593,10 @@ packages:
601593
dependency: transitive
602594
description:
603595
name: url_launcher_windows
604-
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
596+
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
605597
url: "https://pub.dev"
606598
source: hosted
607-
version: "3.1.4"
599+
version: "3.1.5"
608600
vector_math:
609601
dependency: transitive
610602
description:

‎pubspec.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ dev_dependencies:
2727
flutter_test:
2828
sdk: flutter
2929
flutter_lints: ^6.0.0
30-
dmg: ^0.1.7
3130

3231
flutter:
3332
uses-material-design: true

0 commit comments

Comments
 (0)