Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish to TestPyPI
on:
push:
branches: [ main ]
workflow_dispatch: # Allows manual trigger from GitHub UI
jobs:
test-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
python -m build
python -m twine upload --skip-existing dist/*