8 Commits

Author SHA1 Message Date
d092b508c3 chore: set deb version equal to tag
Some checks failed
Release / build (push) Failing after 8m20s
CI / test (push) Successful in 19s
2026-05-04 05:48:46 +02:00
7e1cac8bd1 feat: build and upload deb package in release workflow
Some checks failed
CI / test (push) Successful in 20s
Release / build (push) Has been cancelled
2026-05-04 05:48:10 +02:00
5fea8fe096 fix: align release Python setup with CI fallback logic
All checks were successful
CI / test (push) Successful in 19s
Release / build (push) Successful in 8m22s
2026-05-04 05:26:14 +02:00
05adbf7cc9 run
All checks were successful
CI / test (push) Successful in 19s
2026-05-04 05:24:14 +02:00
69d2bdd661 fix: use python3.12 explicitly for venv on Ubuntu Noble runner
Some checks failed
CI / test (push) Successful in 19s
Release / build (push) Failing after 3s
2026-05-04 05:19:43 +02:00
f88048762e fix: remove python3.11-venv, runner uses python3.12 on Ubuntu Noble
All checks were successful
CI / test (push) Successful in 19s
2026-05-04 05:17:37 +02:00
60f42c7754 fix: install python3.11-venv explicitly in release workflow
All checks were successful
CI / test (push) Successful in 19s
2026-05-04 05:13:18 +02:00
33dff26d2b fix: always install python3-venv in release workflow
All checks were successful
CI / test (push) Successful in 19s
2026-05-04 05:07:39 +02:00
2 changed files with 56 additions and 22 deletions

View File

@@ -59,14 +59,10 @@ jobs:
- name: Ensure Python and pip are available
run: |
if command -v python3 >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1; then
python3 --version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y python3 python3-pip python3-venv
apt-get install -y python3.12 python3.12-venv python3-pip || \
apt-get install -y python3 python3-pip python3-venv
elif command -v dnf >/dev/null 2>&1; then
dnf install -y python3 python3-pip
elif command -v yum >/dev/null 2>&1; then
@@ -76,11 +72,11 @@ jobs:
exit 1
fi
python3 --version
python3.12 --version || python3 --version
- name: Install package and dev dependencies
run: |
python3 -m venv .venv
python3.12 -m venv .venv 2>/dev/null || python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[dev]

View File

@@ -59,32 +59,35 @@ jobs:
- name: Ensure Python and build dependencies are available
run: |
if ! command -v python3 >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
apt-get update
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y python3.12 python3.12-venv python3-pip patchelf ccache || \
apt-get install -y python3 python3-pip python3-venv patchelf ccache
elif command -v dnf >/dev/null 2>&1; then
dnf install -y python3 python3-pip patchelf ccache
fi
elif command -v dnf >/dev/null 2>&1; then
dnf install -y python3 python3-pip python3-devel patchelf ccache
elif command -v yum >/dev/null 2>&1; then
yum install -y python3 python3-pip python3-devel patchelf ccache
else
echo "No supported package manager found to install Python/build deps."
exit 1
fi
# patchelf is required by Nuitka for standalone Linux binaries
command -v patchelf >/dev/null 2>&1 || {
apt-get update && apt-get install -y patchelf
}
python3 --version
python3.12 --version || python3 --version
- name: Set up venv and install package + build deps
run: |
python3 -m venv .venv
python3.12 -m venv .venv 2>/dev/null || python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[build]"
- name: Derive version from tag
id: version
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
run: |
tag="${GITHUB_REF_NAME}"
deb_version="${tag}"
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
echo "deb_version=${deb_version}" >> "$GITHUB_OUTPUT"
- name: Build standalone binary with Nuitka
run: |
@@ -101,6 +104,33 @@ jobs:
- name: Smoke-test the binary
run: dist/tai --help
- name: Build .deb package
run: |
pkg_root="pkgroot"
pkg_name="tai"
deb_version="${{ steps.version.outputs.deb_version }}"
arch="amd64"
out_dir="dist"
deb_dir="${pkg_root}/${pkg_name}_${deb_version}_${arch}"
rm -rf "${pkg_root}"
mkdir -p "${deb_dir}/DEBIAN"
mkdir -p "${deb_dir}/usr/bin"
install -m 0755 dist/tai "${deb_dir}/usr/bin/tai"
cat > "${deb_dir}/DEBIAN/control" <<EOF
Package: ${pkg_name}
Version: ${deb_version}
Section: admin
Priority: optional
Architecture: ${arch}
Maintainer: tai maintainers <noreply@example.com>
Description: tai Linux troubleshooting assistant
EOF
dpkg-deb --build "${deb_dir}" "${out_dir}/${pkg_name}_${deb_version}_${arch}.deb"
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
@@ -108,3 +138,11 @@ jobs:
path: dist/tai
if-no-files-found: error
retention-days: 90
- name: Upload deb artifact
uses: actions/upload-artifact@v3
with:
name: tai-deb-amd64-${{ steps.version.outputs.tag }}
path: dist/tai_${{ steps.version.outputs.deb_version }}_amd64.deb
if-no-files-found: error
retention-days: 90