Skip to content
Open
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
32 changes: 31 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,39 @@ jobs:
name: sbom
path: "**/*.cdx.json"

appimage:
name: appimage (anylinux-${{ matrix.arch }})
needs: [lint, test, security, golden-cross-platform, bench-regression, fidelity-smoke]
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runs-on: ubuntu-latest
- arch: aarch64
runs-on: ubuntu-26.04-arm
runs-on: ${{ matrix.runs-on }}
container: ghcr.io/pkgforge-dev/archlinux:latest
steps:
- uses: actions/checkout@v6
- name: Preparing container
uses: pkgforge-dev/anylinux-setup-action@b2d1ce4216f71162e00ae58fa11ee9aeb723d0d5 # v5
- name: Make AppImage
run: /bin/sh ./scripts/make-appimage.sh
- name: Checksum AppImage
run: |
cd dist
for f in *.AppImage; do
sha256sum "$f" > "$f.sha256"
done
- uses: actions/upload-artifact@v7
with:
name: tokenfold-anylinux-${{ matrix.arch }}
path: dist/*.AppImage*

publish-github-release:
name: publish-github-release
needs: [cross-compile, sbom, sdk-artifacts]
needs: [cross-compile, sbom, sdk-artifacts, appimage]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
23 changes: 23 additions & 0 deletions scripts/make-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
set -eux

ARCH="$(uname -m)"
VERSION="${VERSION:-$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)}"

export ARCH VERSION
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
export OUTPATH="$PWD/dist"
export OUTNAME=tokenfold-"$VERSION"-anylinux-"$ARCH".AppImage
export ICON="DUMMY"
export DESKTOP="DUMMY"
export MAIN_BIN="/usr/bin/tokenfold"

pacman -Syu --noconfirm --needed rustup git
rustup toolchain install 1.98 --profile minimal

cargo build --release --locked -p tokenfold-cli
install -Dm755 target/release/tokenfold /usr/bin/tokenfold

quick-sharun $MAIN_BIN
quick-sharun --make-appimage
quick-sharun --simple-test ./dist/*.AppImage