Skip to content

feat(cli): unify explicit launch args and remove hardcoded defaults #4

feat(cli): unify explicit launch args and remove hardcoded defaults

feat(cli): unify explicit launch args and remove hardcoded defaults #4

Workflow file for this run

name: Release
on:
push:
tags:
- "v*" # Publish on any tag starting with v, e.g., v0.1.0
workflow_dispatch:
jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # Required for hatch-vcs
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Build frontend
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Build frontend
run: |
cd frontend
npm ci
npm run build
rm -rf ../src/hyperview/server/static
mkdir -p ../src/hyperview/server/static
cp -r out/* ../src/hyperview/server/static/
# Build Python package (includes frontend assets)
- name: Build
run: uv build --no-sources
# Smoke test: verify the built package can be imported
- name: Smoke test (wheel)
run: |
uv run --isolated --no-project --with dist/*.whl \
python -c "import hyperview; print(f'hyperview {hyperview.__version__}')"
- name: Smoke test (sdist)
run: |
uv run --isolated --no-project --with dist/*.tar.gz \
python -c "import hyperview; print(f'hyperview {hyperview.__version__}')"
- name: Upload dist artifacts
uses: actions/upload-artifact@v5
with:
name: python-package-distributions
path: dist/
if-no-files-found: error
pypi:
name: Publish to PyPI
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/hyperview
permissions:
id-token: write
contents: read
steps:
- name: Download dist artifacts
uses: actions/download-artifact@v6
with:
name: python-package-distributions
path: dist/
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Publish to PyPI
run: uv publish