Upload Python Package to Test PyPI #35
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: Upload Python Package to Test PyPI | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10 | |
- name: Install dependencies | |
run: | | |
pip install setuptools wheel twine | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Build and publish to Test PyPI | |
env: | |
TWINE_USERNAME: "__token__" | |
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload -r testpypi dist/* |