@@ -2,6 +2,30 @@ name: AppImage (Linux, nix)
22
33on :
44 workflow_dispatch :
5+ push :
6+ tags :
7+ - " v*"
8+ paths :
9+ - " flake.nix"
10+ - " flake.lock"
11+ - " docs/icon.svg"
12+ - " shell/gpui/**"
13+ - " crates/**"
14+ - " Cargo.toml"
15+ - " Cargo.lock"
16+ - " .github/workflows/appimage.yml"
17+ pull_request :
18+ paths :
19+ - " flake.nix"
20+ - " flake.lock"
21+ - " docs/icon.svg"
22+ - " shell/gpui/**"
23+ - " crates/**"
24+ - " Cargo.toml"
25+ - " Cargo.lock"
26+ - " .github/workflows/appimage.yml"
27+ release :
28+ types : [published]
529
630permissions :
731 contents : read
@@ -12,11 +36,28 @@ concurrency:
1236
1337jobs :
1438 appimage :
15- name : Build AppImage (x86_64)
16- runs-on : ubuntu-latest
39+ name : Build AppImage (${{ matrix.system }})
40+ runs-on : ${{ matrix.runner }}
41+ strategy :
42+ fail-fast : false
43+ matrix :
44+ include :
45+ - system : x86_64-linux
46+ runner : ubuntu-latest
47+ artifact : jayjay-gpui-x86_64-linux.AppImage
48+ - system : aarch64-linux
49+ runner : ubuntu-24.04-arm
50+ artifact : jayjay-gpui-aarch64-linux.AppImage
1751 steps :
1852 - uses : actions/checkout@v7
1953
54+ - name : Validate Linux metadata
55+ run : |
56+ sudo apt-get update
57+ sudo apt-get install -y appstream desktop-file-utils
58+ desktop-file-validate shell/gpui/linux/dev.hewig.JayJay.desktop
59+ appstreamcli validate --no-net shell/gpui/linux/dev.hewig.JayJay.metainfo.xml
60+
2061 - name : Install Nix
2162 uses : DeterminateSystems/nix-installer-action@main
2263 with :
@@ -26,27 +67,66 @@ jobs:
2667 - name : Cache /nix/store
2768 uses : nix-community/cache-nix-action@v7
2869 with :
29- primary-key : nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock', '**/Cargo.lock') }}
30- restore-prefixes-first-match : nix-${{ runner.os }}-
70+ primary-key : nix-${{ runner.os }}-${{ matrix.system }}-${{ hashFiles('flake.nix', 'flake.lock', '**/Cargo.lock') }}
71+ restore-prefixes-first-match : nix-${{ runner.os }}-${{ matrix.system }}-
3172 gc-max-store-size-linux : 4G
3273 purge : true
33- purge-prefixes : nix-${{ runner.os }}-
74+ purge-prefixes : nix-${{ runner.os }}-${{ matrix.system }}-
3475 purge-created : 0
3576 purge-last-accessed : 0
3677 purge-primary-key : never
3778
3879 - name : Build AppImage
39- run : nix build --print-build-logs .#appimage
80+ run : nix build --print-build-logs ".#packages.${{ matrix.system }}.appimage"
81+
82+ - name : Inspect AppImage metadata
83+ run : |
84+ rm -rf squashfs-root
85+ ./result --appimage-extract >/tmp/jayjay-appimage-extract.log
86+ test -f squashfs-root/dev.hewig.JayJay.desktop
87+ test -f squashfs-root/.DirIcon
88+ test -f squashfs-root/usr/share/icons/hicolor/scalable/apps/dev.hewig.JayJay.svg
89+ test -f squashfs-root/usr/share/icons/hicolor/256x256/apps/dev.hewig.JayJay.png
90+ grep -q '#3B82F6' squashfs-root/usr/share/icons/hicolor/scalable/apps/dev.hewig.JayJay.svg
91+ grep -q '^Exec=jayjay-gpui %F$' squashfs-root/dev.hewig.JayJay.desktop
92+ grep -q '^Icon=dev.hewig.JayJay$' squashfs-root/dev.hewig.JayJay.desktop
4093
4194 - name : Stage artifact
4295 run : |
4396 mkdir -p out
44- cp -L result out/jayjay-gpui-x86_64.AppImage
45- ls -lh out/
97+ cp -L result "out/${{ matrix.artifact }}"
98+ cd out
99+ sha256sum "${{ matrix.artifact }}" | tee "${{ matrix.artifact }}.sha256"
100+ ls -lh .
46101
47102 - name : Upload artifact
48103 uses : actions/upload-artifact@v7
49104 with :
50- name : jayjay-gpui-x86_64.AppImage
51- path : out/jayjay-gpui-x86_64.AppImage
105+ name : ${{ matrix.artifact }}
106+ path : out/
52107 retention-days : 14
108+
109+ release-assets :
110+ name : Publish AppImage release assets
111+ if : github.event_name == 'release'
112+ needs : appimage
113+ runs-on : ubuntu-latest
114+ permissions :
115+ contents : write
116+ steps :
117+ - name : Download AppImage artifacts
118+ uses : actions/download-artifact@v7
119+ with :
120+ path : dist/appimage
121+ merge-multiple : true
122+
123+ - name : Upload release asset
124+ env :
125+ GH_TOKEN : ${{ github.token }}
126+ TAG_NAME : ${{ github.event.release.tag_name }}
127+ run : |
128+ ls -lh dist/appimage
129+ gh release upload "$TAG_NAME" \
130+ dist/appimage/*.AppImage \
131+ dist/appimage/*.AppImage.sha256 \
132+ --clobber
0 commit comments