@@ -84,14 +84,48 @@ jobs:
8484 strategy :
8585 matrix :
8686 os :
87- - { NAME: linux, OS: ubuntu-latest, ARCH: x86_64, PATH: target/optimized/bob, TARGET: "" }
88- - { NAME: linux, OS: ubuntu-24.04-arm, ARCH: arm, PATH: target/optimized/bob, TARGET: "" }
89- - { NAME: macos, OS: macos-13, ARCH: x86_64, PATH: target/optimized/bob, TARGET: "" }
90- - { NAME: windows, OS: windows-latest, ARCH: x86_64, PATH: build, TARGET: "" }
91- - { NAME: macos, OS: macos-latest, ARCH: arm, PATH: target/optimized/bob, TARGET: "" }
87+ - {
88+ NAME : linux,
89+ OS : ubuntu-latest,
90+ ARCH : x86_64,
91+ PATH : target/optimized/bob,
92+ TARGET : " " ,
93+ }
94+ - {
95+ NAME : linux,
96+ OS : ubuntu-24.04-arm,
97+ ARCH : arm,
98+ PATH : target/optimized/bob,
99+ TARGET : " " ,
100+ }
101+ - {
102+ NAME : macos,
103+ OS : macos-13,
104+ ARCH : x86_64,
105+ PATH : target/optimized/bob,
106+ TARGET : " " ,
107+ }
108+ - {
109+ NAME : windows,
110+ OS : windows-latest,
111+ ARCH : x86_64,
112+ PATH : build,
113+ TARGET : " " ,
114+ }
115+ - {
116+ NAME : macos,
117+ OS : macos-latest,
118+ ARCH : arm,
119+ PATH : target/optimized/bob,
120+ TARGET : " " ,
121+ }
92122 tls :
93123 - { NAME: Rustls, SUFFIX: "", ARGS: "" }
94- - { NAME: OpenSSL, SUFFIX: "-openssl", ARGS: "--no-default-features --features native-tls" }
124+ - {
125+ NAME : OpenSSL,
126+ SUFFIX : " -openssl" ,
127+ ARGS : " --no-default-features --features native-tls" ,
128+ }
95129 runs-on : ${{matrix.os.OS}}
96130 steps :
97131 - uses : actions/checkout@v4
@@ -110,6 +144,48 @@ jobs:
110144 with :
111145 command : build
112146 args : --locked --profile optimized ${{ matrix.tls.ARGS }}
147+ - name : Install AppImage tools
148+ if : matrix.os.NAME == 'linux' && matrix.tls.NAME == 'Rustls'
149+ run : |
150+ sudo apt update && sudo apt install -y libfuse2 # Needed by AppImage/linuxdeploy
151+
152+ # Determine the correct architecture for linuxdeploy download
153+ DOWNLOAD_ARCH=${{ matrix.os.ARCH }}
154+ if [[ "${{ matrix.os.ARCH }}" == "arm" ]]; then
155+ DOWNLOAD_ARCH="aarch64"
156+ fi
157+
158+ echo "Downloading linuxdeploy tools for architecture: $DOWNLOAD_ARCH"
159+ wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$DOWNLOAD_ARCH.AppImage" -O linuxdeploy
160+ wget -c "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-$DOWNLOAD_ARCH.AppImage" -O linuxdeploy-plugin-appimage
161+ chmod +x linuxdeploy linuxdeploy-plugin-appimage
162+
163+ - name : Prepare AppDir
164+ if : matrix.os.NAME == 'linux' && matrix.tls.NAME == 'Rustls'
165+ run : |
166+ mkdir -p AppDir/usr/bin AppDir/usr/share/icons/hicolor/256x256/apps AppDir/usr/share/applications
167+ cp target/optimized/bob AppDir/usr/bin/
168+ cp resources/bob-icon.png AppDir/usr/share/icons/hicolor/256x256/apps/bob.png
169+ cat <<EOF > AppDir/bob.desktop
170+ [Desktop Entry]
171+ Name=Bob Neovim Manager
172+ Exec=bob
173+ Icon=bob
174+ Type=Application
175+ Categories=Utility;Development;
176+ Comment=A cross-platform Neovim version manager
177+ EOF
178+ cp AppDir/bob.desktop AppDir/usr/share/applications/
179+
180+ # Verify the file exists right before linuxdeploy
181+ ls -l AppDir/usr/bin/bob
182+
183+ export UPD_INFO="gh-releases-zsync|Matsuuu|bob|latest|bob-${{ matrix.os.ARCH }}.AppImage.zsync"
184+ export OUTPUT="bob-${{ matrix.os.ARCH }}${{ matrix.tls.SUFFIX }}.AppImage"
185+
186+ # Change --executable path to be relative to CWD
187+ ./linuxdeploy --appdir AppDir --executable AppDir/usr/bin/bob --desktop-file AppDir/bob.desktop --icon-file AppDir/usr/share/icons/hicolor/256x256/apps/bob.png --output appimage
188+
113189 - name : Setup Bob build directory
114190 run : |
115191 mkdir build
@@ -123,3 +199,11 @@ jobs:
123199 path : ${{ matrix.os.PATH }}
124200 if-no-files-found : error
125201 retention-days : 7
202+ - name : Upload Bob AppImage
203+ if : matrix.os.NAME == 'linux' && matrix.tls.NAME == 'Rustls'
204+ uses : actions/upload-artifact@v4
205+ with :
206+ name : " bob-${{ matrix.os.NAME }}-${{ matrix.os.ARCH }}${{ matrix.tls.SUFFIX }}-appimage"
207+ path : " bob-${{ matrix.os.ARCH }}${{ matrix.tls.SUFFIX }}.AppImage*"
208+ if-no-files-found : error
209+ retention-days : 7
0 commit comments