Skip to content

Add GitHub Actions workflows for PyPI publishing #1

Add GitHub Actions workflows for PyPI publishing

Add GitHub Actions workflows for PyPI publishing #1

Workflow file for this run

name: Publish to TestPyPI
on:
push:
branches: [ main, develop ]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: twine check dist/*
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: twine upload dist/*