Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/actions/build-appimage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ inputs:
description: 'Release tag of appimagetool to download'
required: false
default: 'continuous'
update-information:
description: 'zsync update information string (empty disables delta-update embedding)'
required: false
default: 'gh-releases-zsync|frequency403|OpenSSH-GUI|latest|OpenSSH-GUI-x86_64.AppImage.zsync'

outputs:
appimage-name:
description: 'Filename of the produced AppImage'
value: ${{ steps.build.outputs.appimage-name }}
appimage-zsync-name:
description: 'Filename of the produced .zsync file (empty if update-information was not set)'
value: ${{ steps.build.outputs.appimage-zsync-name }}

runs:
using: composite
Expand All @@ -38,7 +45,7 @@ runs:
run: |
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends librsvg2-bin appstream
sudo apt-get install -y --no-install-recommends librsvg2-bin appstream zsync

- name: Download appimagetool
shell: bash
Expand Down Expand Up @@ -116,12 +123,30 @@ runs:

# Assemble AppImage (--appimage-extract-and-run bypasses FUSE requirement)
APPIMAGE_NAME="${ASSET_PREFIX}-x86_64.AppImage"
ARCH=x86_64 ./appimagetool --appimage-extract-and-run AppDir "$APPIMAGE_NAME"
UPDATE_INFO="${{ inputs.update-information }}"

if [[ -n "$UPDATE_INFO" ]]; then
ARCH=x86_64 ./appimagetool --appimage-extract-and-run \
-u "$UPDATE_INFO" \
AppDir "$APPIMAGE_NAME"
else
ARCH=x86_64 ./appimagetool --appimage-extract-and-run AppDir "$APPIMAGE_NAME"
fi

if [[ ! -f "$APPIMAGE_NAME" ]]; then
echo "::error::appimagetool did not produce $APPIMAGE_NAME"
exit 1
fi

echo "appimage-name=$APPIMAGE_NAME" >> "$GITHUB_OUTPUT"

ZSYNC_NAME="${APPIMAGE_NAME}.zsync"
if [[ -n "$UPDATE_INFO" ]]; then
if [[ ! -f "$ZSYNC_NAME" ]]; then
echo "::error::update-information was set but $ZSYNC_NAME was not produced (zsyncmake missing on PATH?)"
exit 1
fi
echo "appimage-zsync-name=$ZSYNC_NAME" >> "$GITHUB_OUTPUT"
fi

echo "::notice::AppImage built successfully: $APPIMAGE_NAME"
8 changes: 8 additions & 0 deletions .github/workflows/build-and-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ jobs:
name: ${{ steps.appimage.outputs.appimage-name }}
path: ${{ steps.appimage.outputs.appimage-name }}
if-no-files-found: error

- name: Upload AppImage zsync file
if: matrix.target == 'linux-x64' && steps.appimage.outputs.appimage-zsync-name != ''
uses: actions/upload-artifact@v7
with:
name: ${{ steps.appimage.outputs.appimage-zsync-name }}
path: ${{ steps.appimage.outputs.appimage-zsync-name }}
if-no-files-found: error

- name: Upload .desktop file
if: matrix.target == 'linux-x64'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
"OpenSSH-GUI-${VERSION}-Setup.exe" \
"OpenSSH-GUI-osx-x64" \
"OpenSSH-GUI-x86_64.AppImage" \
"OpenSSH-GUI-x86_64.AppImage.zsync" \
"appicon.png" \
"io.github.frequency403.openssh_gui.desktop"
do
Expand Down
Loading