Skip to content

Publish to TestPyPI #27

Publish to TestPyPI

Publish to TestPyPI #27

Workflow file for this run

name: Publish to TestPyPI
on:
workflow_run:
workflows: ["Unit Tests"] # The name of your tests workflow
types:
- completed # Trigger when the tests workflow completes
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if tests passed
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8' # Specify the Python version you want to use
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
- name: Build the package
run: python setup.py sdist bdist_wheel
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__ # Use the username __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload --repository testpypi dist/*