The Linux tarball could not start elsewhere: the binary needs libkryonavif.so, which it found only through an absolute RUNPATH into the build machine's Ziran cache. scripts/package-linux.sh stages the app with `ziran install --prefix`, moves build-produced libraries to /usr/lib/BIN, sets RUNPATH $ORIGIN/../lib/BIN, rewrites the desktop entry and builds a Debian package (dependencies from dpkg-shlibdeps) and a linuxdeploy AppImage. Release assets use version-free names so /releases/latest/download links stay stable. Task Manager gets its own icon, which the AppImage requires. Co-Authored-By: Claude Opus 5.5 <[email protected]>
106 lines
3.7 KiB
YAML
106 lines
3.7 KiB
YAML
name: Build and Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: taskmgr-release
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux build, test and release
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Check out taskmgr
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Read locked Ziran toolchain
|
|
id: toolchain
|
|
run: |
|
|
set -eu
|
|
commit=$(awk '/"toolchain"/ { found = 1 } found && /"commit"/ { gsub(/[",]/, "", $2); print $2; exit }' ziran.lock)
|
|
test "${#commit}" -eq 40
|
|
echo "commit=$commit" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Check out locked Ziran
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ziranlang/ziran
|
|
ref: ${{ steps.toolchain.outputs.commit }}
|
|
path: ziran
|
|
|
|
- name: Install native dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential cmake nasm meson ninja-build pkg-config \
|
|
libsdl2-dev libgl1-mesa-dev libx11-dev \
|
|
libcairo2-dev libpango1.0-dev libfontconfig1-dev libfreetype6-dev \
|
|
xvfb xfwm4 xterm x11-utils \
|
|
patchelf dpkg-dev file
|
|
|
|
- name: Fetch linuxdeploy
|
|
run: |
|
|
set -eu
|
|
mkdir -p "$RUNNER_TEMP/linuxdeploy"
|
|
tool="$RUNNER_TEMP/linuxdeploy/linuxdeploy-x86_64.AppImage"
|
|
curl -fsSL -o "$tool" \
|
|
https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1/linuxdeploy-x86_64.AppImage
|
|
echo "c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d $tool" | sha256sum -c -
|
|
chmod 755 "$tool"
|
|
echo "LINUXDEPLOY=$tool" >> "$GITHUB_ENV"
|
|
|
|
- name: Build locked Ziran
|
|
working-directory: ziran
|
|
run: make -j2 JOBS=2 all
|
|
|
|
- name: Build and test taskmgr
|
|
run: |
|
|
printf '[overrides]\nziran = "%s/ziran"\n' "$GITHUB_WORKSPACE" > ziran.local.toml
|
|
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY \
|
|
-u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER \
|
|
HARMONY_DESKTOP_RECOVERY=0 make check test x11-test
|
|
|
|
# Version-free names keep /releases/latest/download/<name> links stable.
|
|
- name: Package Debian and AppImage
|
|
id: package
|
|
run: |
|
|
set -eu
|
|
version=$(cat VERSION)
|
|
tag="v$version"
|
|
make package
|
|
(cd dist && sha256sum taskmgr-linux-amd64.deb taskmgr-linux-x86_64.AppImage > SHA256SUMS)
|
|
dpkg-deb -I dist/taskmgr-linux-amd64.deb
|
|
if git rev-parse "$tag" >/dev/null 2>&1; then
|
|
echo "release=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "release=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Publish new version
|
|
if: steps.package.outputs.release == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
VERSION: ${{ steps.package.outputs.version }}
|
|
TAG: ${{ steps.package.outputs.tag }}
|
|
run: |
|
|
set -eu
|
|
notes=$(awk -v v="$VERSION" '$0 ~ "^## \\[" v "\\]" {found=1; next} found && /^## / {exit} found' CHANGELOG.md)
|
|
test -n "$notes"
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git tag -a "$TAG" -m "Task Manager $VERSION"
|
|
git push origin "$TAG"
|
|
gh release create "$TAG" dist/taskmgr-linux-amd64.deb \
|
|
dist/taskmgr-linux-x86_64.AppImage dist/SHA256SUMS \
|
|
--title "Task Manager $VERSION" --notes "$notes"
|