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
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:
uses: actions/checkout@v4
- name: Build
run: |
docker compose run --build --rm xtool bash -c "Linux/build.sh && mv Linux/packages/xtool{,-${{ matrix.host.arch }}}.AppImage"
docker compose run --build --rm xtool Linux/build.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: xtool-${{ matrix.host.arch }}
path: Linux/packages/xtool-${{ matrix.host.arch }}.AppImage
path: |
Linux/packages/xtool-${{ matrix.host.arch }}.AppImage
Linux/packages/xtool-${{ matrix.host.arch }}.AppImage.zsync
build-mac:
runs-on: macos-15
permissions:
Expand Down Expand Up @@ -72,4 +74,4 @@ jobs:
run: |
TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}"
gh release create "$TAG" --draft --title "Draft Release"
gh release upload "$TAG" output/**/*.{AppImage,app.zip,app.dSYM.zip}
gh release upload "$TAG" output/**/*.{AppImage,AppImage.zsync,app.zip,app.dSYM.zip}
15 changes: 10 additions & 5 deletions Linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ shopt -s nullglob

cd "$(dirname "$0")"

# installer version
export LINUXDEPLOY_OUTPUT_VERSION="1.0.0"
# release version
export LINUXDEPLOY_OUTPUT_VERSION="latest"

if ! command -v fusermount &>/dev/null; then
# Docker doesn't support FUSE
Expand All @@ -21,6 +21,7 @@ bin="$(swift build --package-path .. -c release --show-bin-path)"
strip "${bin}/xtool"

curr_git_info="$(curl -fsSL https://api.github.com/repos/linuxdeploy/linuxdeploy/git/refs/tags/continuous)"
curr_arch="$(uname -m)"

if [[ -f staging/linuxdeploy/git.json ]]; then
if ! cmp -s staging/linuxdeploy/git.json <(echo "$curr_git_info"); then
Expand All @@ -33,7 +34,7 @@ else
fi

if [[ ! -f staging/linuxdeploy/linuxdeploy.AppImage ]]; then
curl -fsSL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(arch).AppImage" \
curl -fsSL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${curr_arch}.AppImage" \
-o staging/linuxdeploy/linuxdeploy.AppImage
chmod +x staging/linuxdeploy/linuxdeploy.AppImage
echo "$curr_git_info" > staging/linuxdeploy/git.json
Expand All @@ -42,14 +43,18 @@ fi
mkdir -p staging/tmp/AppDir/usr/bin
find "${bin}"/ -name '*.resources' -print0 | xargs -0 -I {} cp -a {} "${PWD}/staging/tmp/AppDir/usr/bin/"

LDAI_OUTPUT="staging/tmp/xtool.AppImage" ./staging/linuxdeploy/linuxdeploy.AppImage \
env \
LDAI_OUTPUT="staging/tmp/xtool.AppImage" \
LDAI_UPDATE_INFORMATION="gh-releases-zsync|xtool-org|xtool|latest|xtool-${curr_arch}.AppImage.zsync" \
./staging/linuxdeploy/linuxdeploy.AppImage \
--appdir staging/tmp/AppDir \
--output appimage \
-e "${bin}/xtool" \
-d xtool.desktop \
-i xtool.png
mkdir -p packages
mv -f staging/tmp/xtool.AppImage packages/xtool.AppImage
mv -f staging/tmp/xtool.AppImage "packages/xtool-${curr_arch}.AppImage"
mv -f ./xtool.AppImage.zsync "packages/xtool-${curr_arch}.AppImage.zsync"

rm -rf staging/tmp

Expand Down
Loading