Skip to content

Publish to TestPyPI

Publish to TestPyPI #8

name: Publish to TestPyPI
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for TEST release'
required: true
# push:
# tags:
# - '*'
jobs:
publish-test-pypi:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install tools
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Checkout tag ${{ github.event.inputs.tag }}
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- name: Build source distribution and wheel
run: |
python setup.py sdist bdist_wheel
- name: List distribution artifacts
run: |
ls -l dist/
- name: Publish package to TestPyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/