ci: emit single self-launching AppImage artifact (no extra files, no host FUSE required)
electron-linux-arm64 / electron-linux-arm64 (push) Successful in 1m0s
electron-linux-amd64 / electron-linux-amd64 (push) Successful in 1m33s

This commit is contained in:
OpenClaw Bot
2026-03-14 21:36:43 +00:00
parent cb11e3c8ad
commit 2c449514be
3 changed files with 40 additions and 34 deletions
+17 -7
View File
@@ -36,7 +36,7 @@ jobs:
set -eu
npm run build:linux:amd64
- name: Collect run-specific artifact (+ no-fuse launcher)
- name: Collect single consumer artifact (no-FUSE compatible)
run: |
set -eu
rm -rf artifacts
@@ -44,15 +44,25 @@ jobs:
appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true)
[ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; }
out="artifacts/electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage"
cp "$appimage" "$out"
chmod +x "$out"
cat > "artifacts/run-electron_tray_demo-linux-amd64-run${{ github.run_number }}-no-fuse.sh" <<'SH'
cat > "$out" <<'SH'
#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")"
APPIMAGE_EXTRACT_AND_RUN=1 ./electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage
self="$0"
workdir="$(mktemp -d)"
cleanup() { rm -rf "$workdir"; }
trap cleanup EXIT INT TERM
payload="$workdir/app.AppImage"
awk 'found { print } /^__APPIMAGE_PAYLOAD_BELOW__$/ { found=1; next }' "$self" | base64 -d > "$payload"
chmod +x "$payload"
APPIMAGE_EXTRACT_AND_RUN=1 "$payload" "$@"
exit $?
__APPIMAGE_PAYLOAD_BELOW__
SH
chmod +x "artifacts/run-electron_tray_demo-linux-amd64-run${{ github.run_number }}-no-fuse.sh"
# remove YAML indentation from embedded launcher script
sed -i 's/^ //' "$out"
base64 -w 0 "$appimage" >> "$out"
echo >> "$out"
chmod +x "$out"
- name: Upload artifacts
uses: actions/upload-artifact@v3
+17 -7
View File
@@ -36,7 +36,7 @@ jobs:
set -eu
npm run build:linux:arm64
- name: Collect run-specific artifact (+ no-fuse launcher)
- name: Collect single consumer artifact (no-FUSE compatible)
run: |
set -eu
rm -rf artifacts
@@ -44,15 +44,25 @@ jobs:
appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true)
[ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; }
out="artifacts/electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage"
cp "$appimage" "$out"
chmod +x "$out"
cat > "artifacts/run-electron_tray_demo-linux-arm64-run${{ github.run_number }}-no-fuse.sh" <<'SH'
cat > "$out" <<'SH'
#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")"
APPIMAGE_EXTRACT_AND_RUN=1 ./electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage
self="$0"
workdir="$(mktemp -d)"
cleanup() { rm -rf "$workdir"; }
trap cleanup EXIT INT TERM
payload="$workdir/app.AppImage"
awk 'found { print } /^__APPIMAGE_PAYLOAD_BELOW__$/ { found=1; next }' "$self" | base64 -d > "$payload"
chmod +x "$payload"
APPIMAGE_EXTRACT_AND_RUN=1 "$payload" "$@"
exit $?
__APPIMAGE_PAYLOAD_BELOW__
SH
chmod +x "artifacts/run-electron_tray_demo-linux-arm64-run${{ github.run_number }}-no-fuse.sh"
# remove YAML indentation from embedded launcher script
sed -i 's/^ //' "$out"
base64 -w 0 "$appimage" >> "$out"
echo >> "$out"
chmod +x "$out"
- name: Upload artifacts
uses: actions/upload-artifact@v3