Publish to TestPyPI #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |