Skip to content
Merged
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
151 changes: 151 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: release

on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: read

jobs:
python:
name: build · wheel + sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22.12.0"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e . build
npm --prefix frontend/web ci
npm --prefix frontend/tui ci
- name: Build release sources
run: python -m argus_skill.release_tools.build_release
- name: Validate tag and package versions
if: startsWith(github.ref, 'refs/tags/v')
run: |
python - <<'PY'
import json
import os
import tomllib
from pathlib import Path

python_version = tomllib.loads(
Path("pyproject.toml").read_text(encoding="utf-8")
)["project"]["version"]
desktop_version = json.loads(
Path("desktop/package.json").read_text(encoding="utf-8")
)["version"]
tag = os.environ["GITHUB_REF_NAME"]
assert tag == f"v{python_version}", (
f"tag {tag!r} does not match Python package version {python_version!r}"
)
assert desktop_version == python_version, (
f"Desktop version {desktop_version!r} does not match "
f"Python package version {python_version!r}"
)
PY
- name: Build distributions
run: python -m build
- name: Clean-install wheel smoke
run: |
python -m venv /tmp/argus-wheel-smoke
/tmp/argus-wheel-smoke/bin/python -m pip install dist/*.whl
/tmp/argus-wheel-smoke/bin/argus-skill --version
/tmp/argus-wheel-smoke/bin/python - <<'PY'
from pathlib import Path
import argus_skill
root = Path(argus_skill.__file__).parent
assert (root / "_frontend/web/dist/index.html").is_file()
assert (root / "_frontend/tui/bundle/argus.mjs").is_file()
PY
- uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist/*

windows:
name: build · Windows installers
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22.12.0"
cache: npm
cache-dependency-path: |
frontend/web/package-lock.json
frontend/tui/package-lock.json
desktop/package-lock.json
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e . "pyinstaller>=6.11,<7"
npm --prefix frontend/web ci
npm --prefix frontend/tui ci
npm --prefix desktop ci
- name: Build release sources
run: python -m argus_skill.release_tools.build_release
- name: Build frozen backend
shell: pwsh
run: ./desktop/scripts/build-backend.ps1 -SkipInstall
- name: Build Desktop
run: npm --prefix desktop run build
- name: Build unsigned installer and portable executable
working-directory: desktop
run: >-
npx electron-builder --win nsis portable --publish never
--config.win.signAndEditExecutable=false
- uses: actions/upload-artifact@v4
with:
name: windows-installers
path: desktop/release/*.exe

pypi:
name: publish · PyPI
if: startsWith(github.ref, 'refs/tags/v')
needs: [python, windows]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: pypi
url: https://pypi.org/project/argus-skill/
steps:
- uses: actions/download-artifact@v4
with:
name: python-dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1

github:
name: publish · GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
needs: [python, windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-dist
path: release-assets
- uses: actions/download-artifact@v4
with:
name: windows-installers
path: release-assets
- uses: softprops/action-gh-release@v2
with:
files: release-assets/**/*
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ env:
tests/daemon/test_spawn_helper.py
tests/daemon/test_windows_daemon_control.py
tests/daemon/test_windows_terminal_process.py
tests/core/test_agent_probe.py
tests/core/test_backend_readiness.py
tests/core/test_cheap_route_models.py
tests/maintenance/test_repair_pipeline.py
tests/maintenance/test_doctor_advisor.py
tests/test_agent_cli_backend.py
tests/test_bootstrap_doctor.py
tests/test_doctor.py
tests/test_install_documentation.py
tests/tools/test_setup_readiness.py
tests/webapi/test_commands_m1.py
tests/webapi/test_server_m0.py
tests/webapi/test_workspace_v2.py
Expand Down Expand Up @@ -126,6 +132,28 @@ jobs:
- name: Test portable surface
run: python -m pytest -q ${{ env.PORTABLE_TESTS }}

- uses: astral-sh/setup-uv@v5
if: runner.os == 'macOS'
- name: Smoke macOS uv tool install
if: runner.os == 'macOS'
run: |
export UV_TOOL_DIR="$RUNNER_TEMP/argus-tools"
export UV_TOOL_BIN_DIR="$RUNNER_TEMP/argus-bin"
uv tool install --python 3.12 .
"$UV_TOOL_BIN_DIR/argus-skill" --version
"$UV_TOOL_BIN_DIR/argus" --help

- name: Smoke Windows direct pip install
if: runner.os == 'Windows'
shell: pwsh
run: |
python -m pip install build
python -m build --wheel
python -m pip uninstall -y argus-skill
python -m pip install --no-deps (Get-ChildItem dist\*.whl).FullName
argus-skill --version
argus --help

# The pairing banner is written to stderr, which on Windows uses the ANSI
# code page (cp1252/cp936) whenever output is redirected — not UTF-8.
# Printing a QR code there used to raise UnicodeEncodeError and abort
Expand Down
Loading
Loading