Skip to content

Update version

Update version #2

Workflow file for this run

name: Publish 📦 to TestPyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]*
- v[0-9]+.[0-9]+.[0-9]+-beta[0-9]*
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]*
jobs:
build-n-publish:
name: Build and publish Python distributions to TestPyPI
runs-on: ubuntu-latest
steps:
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create venv
run: uv venv
- name: Install tk_tools
run: uv pip install -e .
- name: Execute Tests
run: xvfb-run -a uv run pytest -v tests/ --cov=tk_tools
- name: Build wheel file in `dist/`
run: uv build
# - name: Build docs
# run: |
# mkdir gh-pages
# touch gh-pages/.nojekyll
# cd docs/
# uv run sphinx-build -b html . _build
- name: Build docs
run: |
cd docs/
uv run sphinx-build -b html . ./html
- name: Publish distribution 📦 to Test PyPI with UV
run: uv publish --token ${{ secrets.TEST_PYPI_API_TOKEN }} --publish-url https://test.pypi.org/legacy/