Skip to content

Commit 33d294b

Browse files
committed
[CI] Try to build an AppImage for X64 and ARM64
1 parent bede6d4 commit 33d294b

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,68 @@ jobs:
5353
cp -r ../data .
5454
7z -tzip -mx=5 a hcl-${{ matrix.platform }} data hcl
5555
56+
- name: "Preparing Arm64 AppImage"
57+
if: matrix.platform == 'ARM64'
58+
run: |
59+
cd build
60+
git clone https://github.com/AppImage/appimagetool.git
61+
cd appimagetool
62+
ARCH="aarch64" ./ci/build-in-docker.sh
63+
64+
- name: "Preparing X64 AppImage"
65+
if: matrix.platform == 'X64'
66+
run: |
67+
cd build
68+
git clone https://github.com/AppImage/appimagetool.git
69+
cd appimagetool
70+
ARCH="x86_64" ./ci/build-in-docker.sh
71+
72+
- name: "Creating AppImage"
73+
if: matrix.platform == 'X64' || matrix.platform == 'ARM64'
74+
run: |
75+
cd build
76+
mkdir AppDir
77+
cd AppDir
78+
mkdir usr
79+
mkdir usr/bin
80+
mkdir usr/lib
81+
mkdir -p usr/share/applications
82+
mkdir -p usr/share/icons/hicolor/256x256
83+
mkdir -p usr/share/icons/hicolor/48x48
84+
cp ../hcl usr/bin/
85+
cp ../../io.github.ptitSeb.hydracastlelabyrinth.png hcl.png
86+
cp ../../io.github.ptitSeb.hydracastlelabyrinth.png usr/share/icons/hicolor/256x256/hcl.png
87+
cp ../../icon.png usr/share/icons/hicolor/48x48/hcl.png
88+
cat <<EOF > hcl.desktop
89+
[Desktop Entry]
90+
Name=Hydra Castle Labyrinth
91+
Comment=A modern Linux port of Hydra Castle Labyrinth.
92+
Exec=hcl
93+
Icon=hcl
94+
Terminal=false
95+
Type=Application
96+
Categories=Game;
97+
EOF
98+
cp hcl.desktop usr/share/applications/
99+
cat <<EOF > AppRun
100+
#! /usr/bin/env bash
101+
PWD="$(readlink -f "$(dirname "$0")")"
102+
"$PWD/usr/bin/hcl" $@
103+
EOF
104+
chmod +x AppRun
105+
cd ../appimagetool
106+
./appimagetool-*.AppImage ../build/AppDir ../hcl-${{ matrix.platform }}.AppImage
107+
108+
56109
- name: "Upload Zip File"
57110
uses: actions/upload-artifact@v4
58111
with:
59112
name: hcl-${{ matrix.platform }}.zip
60113
path: build/hcl-${{ matrix.platform }}.zip
114+
115+
- name: "Upload AppImage"
116+
if: matrix.platform == 'X64' || matrix.platform == 'ARM64'
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: hcl-${{ matrix.platform }}.AppImage
120+
path: build/hcl-${{ matrix.platform }}.AppImage

0 commit comments

Comments
 (0)