Skip to content

Release v0.1.3

Release v0.1.3 #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags: ['v*']
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build viewer frontend
run: |
cd frontend
npm ci
npm run build:viewer
- name: Build Python distribution
run: |
python -m pip install --upgrade pip build
python -m build
- name: Verify tag matches pyproject version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
PKG=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
if [ "$TAG" != "$PKG" ]; then
echo "Tag v$TAG does not match pyproject version $PKG"
exit 1
fi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1