Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

Commit 2997597

Browse files
AntonAnton
authored andcommitted
release: add CI packaging workflow for v4.7.9 prerelease artifacts
Keep the promoted v4.7 tree intact while adding the GitHub Actions release workflow and Windows standalone bootstrap script on a release-only commit so CI can build Linux and Windows assets for the prerelease tag.
1 parent f263e28 commit 2997597

2 files changed

Lines changed: 162 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
10+
env:
11+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
12+
13+
jobs:
14+
build:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: macos-latest
20+
platform: macOS
21+
- os: ubuntu-latest
22+
platform: Linux
23+
- os: windows-latest
24+
platform: Windows
25+
26+
runs-on: ${{ matrix.os }}
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
31+
- uses: actions/setup-python@v6
32+
with:
33+
python-version: '3.10'
34+
35+
# ── System deps (Linux only) ──────────────────────────────────
36+
- name: Install system dependencies
37+
if: runner.os == 'Linux'
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y \
41+
libgirepository1.0-dev gcc libcairo2-dev \
42+
pkg-config python3-dev \
43+
gir1.2-gtk-3.0 gir1.2-webkit2-4.1
44+
45+
# ── Download python-build-standalone ──────────────────────────
46+
- name: Download python-standalone (Unix)
47+
if: runner.os != 'Windows'
48+
run: bash scripts/download_python_standalone.sh
49+
50+
- name: Download python-standalone (Windows)
51+
if: runner.os == 'Windows'
52+
shell: pwsh
53+
run: .\scripts\download_python_standalone.ps1
54+
55+
# ── Build tools ───────────────────────────────────────────────
56+
- name: Install build dependencies
57+
run: pip install -r requirements-launcher.txt pyinstaller
58+
59+
# ── Platform builds ───────────────────────────────────────────
60+
- name: Build (macOS)
61+
if: runner.os == 'macOS'
62+
run: |
63+
VERSION=$(cat VERSION | tr -d '[:space:]')
64+
python -m PyInstaller Ouroboros.spec --clean --noconfirm
65+
sleep 3
66+
hdiutil create -volname Ouroboros \
67+
-srcfolder dist/Ouroboros.app -ov -format UDZO \
68+
"dist/Ouroboros-${VERSION}-macos.dmg" \
69+
|| { sleep 10; hdiutil create -volname Ouroboros \
70+
-srcfolder dist/Ouroboros.app -ov -format UDZO \
71+
"dist/Ouroboros-${VERSION}-macos.dmg"; }
72+
73+
- name: Build (Linux)
74+
if: runner.os == 'Linux'
75+
run: |
76+
VERSION=$(cat VERSION | tr -d '[:space:]')
77+
python -m PyInstaller Ouroboros.spec --clean --noconfirm
78+
cd dist && tar -czf "Ouroboros-${VERSION}-linux-x86_64.tar.gz" Ouroboros/
79+
80+
- name: Build (Windows)
81+
if: runner.os == 'Windows'
82+
shell: pwsh
83+
run: |
84+
$Version = (Get-Content VERSION).Trim()
85+
python -m PyInstaller Ouroboros.spec --clean --noconfirm
86+
Compress-Archive -Path dist\Ouroboros -DestinationPath "dist\Ouroboros-${Version}-windows-x64.zip" -Force
87+
88+
# ── Upload ────────────────────────────────────────────────────
89+
- name: Upload build artifact
90+
uses: actions/upload-artifact@v6
91+
with:
92+
name: ouroboros-${{ matrix.platform }}
93+
path: |
94+
dist/*.dmg
95+
dist/*.tar.gz
96+
dist/*.zip
97+
98+
# ── GitHub Release ──────────────────────────────────────────────────
99+
release:
100+
needs: build
101+
runs-on: ubuntu-latest
102+
permissions:
103+
contents: write
104+
steps:
105+
- uses: actions/download-artifact@v7
106+
with:
107+
merge-multiple: true
108+
path: artifacts
109+
110+
- name: Create GitHub Release
111+
uses: softprops/action-gh-release@v2
112+
with:
113+
files: artifacts/*
114+
generate_release_notes: true
115+
prerelease: ${{ contains(github.ref_name, '-') }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Downloads python-build-standalone for Windows (x86_64)
2+
# Run from repo root: powershell -ExecutionPolicy Bypass -File scripts/download_python_standalone.ps1
3+
4+
$ErrorActionPreference = "Stop"
5+
6+
$Release = "20260211"
7+
$PyVersion = "3.10.19"
8+
$Dest = "python-standalone"
9+
$Platform = "x86_64-pc-windows-msvc"
10+
11+
$Filename = "cpython-${PyVersion}+${Release}-${Platform}-install_only_stripped.tar.gz"
12+
$Url = "https://github.com/astral-sh/python-build-standalone/releases/download/${Release}/${Filename}"
13+
14+
Write-Host "=== Downloading Python ${PyVersion} for ${Platform} ==="
15+
Write-Host "URL: ${Url}"
16+
17+
if (Test-Path $Dest) { Remove-Item -Recurse -Force $Dest }
18+
if (Test-Path "_python_tmp") { Remove-Item -Recurse -Force "_python_tmp" }
19+
New-Item -ItemType Directory -Path "_python_tmp" | Out-Null
20+
21+
$ArchivePath = "_python_tmp\python.tar.gz"
22+
Write-Host "Downloading..."
23+
Invoke-WebRequest -Uri $Url -OutFile $ArchivePath -UseBasicParsing
24+
25+
Write-Host "Extracting..."
26+
tar -xzf $ArchivePath -C "_python_tmp"
27+
28+
Move-Item "_python_tmp\python" $Dest
29+
Remove-Item -Recurse -Force "_python_tmp"
30+
31+
Write-Host ""
32+
Write-Host "=== Installing agent dependencies ==="
33+
& "${Dest}\python.exe" -m pip install --quiet -r requirements.txt
34+
35+
Write-Host ""
36+
Write-Host "=== Installing optional: local model support ==="
37+
try {
38+
& "${Dest}\python.exe" -m pip install --quiet "llama-cpp-python[server]" 2>&1
39+
Write-Host "llama-cpp-python installed successfully"
40+
} catch {
41+
Write-Warning "llama-cpp-python install failed - local model support will not be available"
42+
}
43+
44+
Write-Host ""
45+
Write-Host "=== Done ==="
46+
Write-Host "Python: ${Dest}\python.exe"
47+
& "${Dest}\python.exe" --version

0 commit comments

Comments
 (0)