Skip to content

Publish to Test PyPI #21

Publish to Test PyPI

Publish to Test PyPI #21

Workflow file for this run

name: Publish to Test PyPI
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check-out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Important: need full history for version detection
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Build package
run: hatch build
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}