Skip to content

v0.1.2

v0.1.2 #7

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
push:
tags: [ 'v*.*.*' ]
release:
types: [ published ]
permissions:
contents: read
jobs:
deploy-linux:
name: Build wheels for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build wheels for Linux
run: |
uv pip install --system build
uv pip install --system wheel
python -m build --wheel
- name: Upload Linux wheels as artifact
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: dist/*.whl
retention-days: 1
deploy-macos:
name: Build wheels for macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build frontend
run: |
bash scripts/rebuild_frontend.sh
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build wheels for macOS
run: |
uv pip install --system build
uv pip install --system wheel
python -m build --wheel
- name: Upload macOS wheels as artifact
uses: actions/upload-artifact@v4
with:
name: macos-wheels
path: dist/*.whl
retention-days: 1
publish:
name: Publish wheels to PyPI
runs-on: ubuntu-latest
needs: [ deploy-linux, deploy-macos ]
permissions:
id-token: write # Required for PyPI trusted publishing
steps:
- name: Download Linux wheels
uses: actions/download-artifact@v4
with:
name: linux-wheels
path: linux-wheels
- name: Download macOS wheels
uses: actions/download-artifact@v4
with:
name: macos-wheels
path: macos-wheels
- name: Combine wheels into a single directory
run: |
mkdir -p dist
cp linux-wheels/*.whl dist/
cp macos-wheels/*.whl dist/
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Publish package to PyPI
run: |
uv pip install --system twine
python -m twine upload dist/*.whl