Skip to content

Publish to TestPyPI

Publish to TestPyPI #1

name: Publish to TestPyPI
on:
workflow_run:
workflows: ["Update Version"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel build twine
- name: Build the package
run: |
python setup.py sdist
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }}
run: |
python -m twine upload --repository testpypi dist/*