Appimage #51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh" | |
| export URUNTIME_LINK="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" | |
| export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync" | |
| export URUNTIME_PRELOAD=1 | |
| 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" | |
| NOTIFY_URL="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/bin/notify" | |
| FIXNAMESPACES_URL="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/hooks/fix-namespaces.hook" | |
| mkdir -p ./AppDir/bin | |
| cp -v ./sas.sh ./AppDir/AppRun | |
| wget --retry-connrefused --tries=30 "$AWK_URL" -O ./AppDir/bin/awk | |
| wget --retry-connrefused --tries=30 "$BWRAP_URL" -O ./AppDir/bin/bwrap | |
| wget --retry-connrefused --tries=30 "$BWRAP_PATCHED_URL" -O ./AppDir/bin/bwrap.patched | |
| wget --retry-connrefused --tries=30 "$SQUASHFUSE_URL" -O ./AppDir/bin/squashfuse | |
| wget --retry-connrefused --tries=30 "$NOTIFY_URL" -O ./AppDir/bin/notify | |
| wget --retry-connrefused --tries=30 "$FIXNAMESPACES_URL" -O ./AppDir/detect-nonsense.sh | |
| chmod +x ./AppDir/AppRun ./AppDir/detect-nonsense.sh ./AppDir/bin/* | |
| sed -i -e '/HOSTPATH/d' ./AppDir/bin/notify | |
| # make appimage with uruntime | |
| VERSION="$(./AppDir/AppRun --version)" | |
| echo "$VERSION" > ~/version | |
| export OUTNAME=sas-"$VERSION"-anylinux-"$ARCH".AppImage | |
| wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage | |
| chmod +x ./uruntime2appimage | |
| ./uruntime2appimage | |
| mkdir ./dist | |
| mv -v ./*.AppImage* ./dist | |
| mv -v ~/version ./dist | |
| echo "All Done!" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: AppImage-${{ matrix.arch }} | |
| path: 'dist' | |
| release: | |
| if: ${{ github.ref_name == 'main' }} | |
| needs: [build] | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| pattern: AppImage-* | |
| merge-multiple: true | |
| - name: Read version | |
| run: | | |
| cat version | |
| echo "VERSION=$(cat version)" >> "${GITHUB_ENV}" | |
| #Version Release | |
| - name: Continuous Releaser | |
| uses: softprops/action-gh-release@v2.2.2 | |
| if: ${{ github.ref_name == 'main' }} | |
| with: | |
| name: "${{ env.VERSION }}" | |
| tag_name: "${{ env.VERSION }}" | |
| prerelease: false | |
| draft: true | |
| generate_release_notes: true | |
| make_latest: true | |
| files: | | |
| *.AppImage* | |
| continue-on-error: false |