Skip to content

Commit 3101fbe

Browse files
committed
ci(github-actions): package Linux AppImage as tar.gz in CI
This commit updates the desktop build workflow to archive the Linux AppImage output into a `.tar.gz` file instead of uploading the raw directory. This ensures better compatibility and preservation of file permissions for Linux distributions. - **ci(github-actions)**: Added steps to list and locate the AppImage build output directory dynamically. - **ci(github-actions)**: Implemented a packaging step to compress the AppImage directory into `GitHub-Store-linux-x64.tar.gz`. - **ci(github-actions)**: Updated the `linux-appimage` artifact upload to use the newly created compressed archive.
1 parent ba49df4 commit 3101fbe

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/build-desktop-platforms.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,41 @@ jobs:
234234
retry ./gradlew :composeApp:packageAppImage
235235
shell: bash
236236

237+
- name: List AppImage build output
238+
if: matrix.label == 'modern'
239+
run: |
240+
echo "=== Listing build output ==="
241+
find composeApp/build/compose/binaries/main -maxdepth 3 -type d 2>/dev/null || echo "Directory not found"
242+
echo "=== All files ==="
243+
find composeApp/build/compose/binaries/main -maxdepth 4 -type f 2>/dev/null | head -30 || echo "No files found"
244+
shell: bash
245+
246+
- name: Package AppImage as tar.gz
247+
if: matrix.label == 'modern'
248+
run: |
249+
set -euo pipefail
250+
251+
# Find the app-image output directory (could be app-image/ or app/)
252+
APPIMAGE_DIR=""
253+
for dir in composeApp/build/compose/binaries/main/app-image composeApp/build/compose/binaries/main/app; do
254+
if [ -d "$dir" ]; then
255+
APPIMAGE_DIR="$dir"
256+
echo "Found AppImage output at: $dir"
257+
break
258+
fi
259+
done
260+
261+
if [ -z "$APPIMAGE_DIR" ]; then
262+
echo "ERROR: Could not find AppImage output directory"
263+
ls -la composeApp/build/compose/binaries/main/ || true
264+
exit 1
265+
fi
266+
267+
tar -czf composeApp/build/compose/binaries/main/GitHub-Store-linux-x64.tar.gz -C "$APPIMAGE_DIR" .
268+
echo "Created tar.gz archive:"
269+
ls -lh composeApp/build/compose/binaries/main/GitHub-Store-linux-x64.tar.gz
270+
shell: bash
271+
237272
- name: Upload Linux installers
238273
uses: actions/upload-artifact@v4
239274
with:
@@ -249,7 +284,7 @@ jobs:
249284
uses: actions/upload-artifact@v4
250285
with:
251286
name: linux-appimage
252-
path: |
253-
composeApp/build/compose/binaries/main/app-image/
287+
path: composeApp/build/compose/binaries/main/GitHub-Store-linux-x64.tar.gz
288+
if-no-files-found: error
254289
retention-days: 30
255290
compression-level: 6

0 commit comments

Comments
 (0)