Skip to content

Publish Python Package to TestPyPI #5

Publish Python Package to TestPyPI

Publish Python Package to TestPyPI #5

Workflow file for this run

name: Publish Python Package to TestPyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build package
run: python -m build
- name: Publish package to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*