Skip to content

Appimage

Appimage #39

Workflow file for this run

name: Appimage
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
jobs:
build:
name: "${{ matrix.name }} (${{ matrix.arch }})"
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- runs-on: ubuntu-latest
name: "Build AppImage"
arch: x86_64
- runs-on: ubuntu-24.04-arm
name: "Build AppImage"
arch: aarch64
steps:
- uses: actions/checkout@v4
- name: Make AppImage
run: |
set -ex
sudo apt install wget tar zsync
ARCH="$(uname -m)"
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH"
URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-$ARCH"
UPINFO="gh-releases-zsync|$(echo $GITHUB_REPOSITORY | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
BWRAP_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/bubblewrap/official/bwrap/raw.dl"
BWRAP_PATCHED_URL="https://pkgs.pkgforge.dev/dl/bincache/x86_64-linux/bubblewrap/patched/bwrap/raw.dl"
AWK_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/mawk/mawk/raw.dl"
SQUASHFUSE_URL="https://pkgs.pkgforge.dev/dl/bincache/$ARCH-linux/squashfuse/nixpkgs/squashfuse/raw.dl"
FIXNAMESPACES_URL="https://raw.githubusercontent.com/Samueru-sama/fix-ubuntu-nonsense/refs/heads/main/detect-nonsense.sh"
mkdir -p ./AppDir/bin
cp -v ./sas.sh ./AppDir/AppRun
cd ./AppDir
wget --retry-connrefused --tries=30 "$AWK_URL" -O ./bin/awk
wget --retry-connrefused --tries=30 "$BWRAP_URL" -O ./bin/bwrap
wget --retry-connrefused --tries=30 "$BWRAP_PATCHED_URL" -O ./bin/bwrap.patched
wget --retry-connrefused --tries=30 "$SQUASHFUSE_URL" -O ./bin/squashfuse
wget --retry-connrefused --tries=30 "$FIXNAMESPACES_URL" -O ./detect-nonsense.sh
chmod +x ./AppRun ./detect-nonsense.sh ./bin/*
VERSION="$(./AppRun --version)"
[ -n "$VERSION" ]
echo "$VERSION" > ~/version
# make appimage with uruntime
cd ..
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime
wget --retry-connrefused --tries=30 "$URUNTIME_LITE" -O ./uruntime-lite
chmod +x ./uruntime*
# Keep the mount point (speeds up launch time)
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-lite
# Add udpate info to runtime
echo "Adding update information \"$UPINFO\" to runtime..."
./uruntime-lite --appimage-addupdinfo "$UPINFO"
echo "Generating AppImage..."
./uruntime --appimage-mkdwarfs -f \
--set-owner 0 --set-group 0 \
--no-history --no-create-timestamp \
--compression zstd:level=22 -S26 -B8 \
--header uruntime-lite \
-i ./AppDir -o ./sas-"$VERSION"-anylinux-"$ARCH".AppImage
echo "Generating zsync file..."
zsyncmake *.AppImage -u *.AppImage
mkdir dist
mv -v *.AppImage* dist/
echo "All Done!"
- name: Check version file
run: |
cat ~/version
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
- name: Upload artifact
uses: actions/upload-artifact@v4.6.2
with:
name: AppImage-${{ matrix.arch }}
path: 'dist'
- name: Upload version file
uses: actions/upload-artifact@v4.6.2
with:
name: version
path: ~/version
overwrite: true
release:
if: ${{ github.ref_name == 'main' }}
needs: [build]
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.3.0
with:
name: AppImage-x86_64
- uses: actions/download-artifact@v4.3.0
with:
name: AppImage-aarch64
- uses: actions/download-artifact@v4.3.0
with:
name: version
- name: Read version
run: |
cat version
export VERSION="$(cat version)"
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
#Version Release
- name: Continuous Releaser
uses: softprops/action-gh-release@v2.2.2
if: ${{ github.ref_name == 'main' }}
with:
name: "${{ env.APP_VERSION }}"
tag_name: "${{ env.APP_VERSION }}"
prerelease: false
draft: true
generate_release_notes: true
make_latest: true
files: |
*.AppImage*
continue-on-error: false