Skip to content

Publish to TestPyPI

Publish to TestPyPI #7

name: Publish to TestPyPI
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install flit and twine
run: |
python -m pip install --upgrade pip
pip install twine
pip install flit
- name: Build and publish test package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
python -m flit build
python -m twine upload dist/*