2.3.1 #22
Workflow file for this run
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 on PyPI | |
on: | |
release: | |
types: [published] | |
# published, unpublished, created, edited, deleted, or prereleased | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[pypi]" | |
- name: Build source distribution | |
run: | | |
python3 setup.py sdist bdist_wheel | |
twine check dist/* | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ | |
continue-on-error: true | |
- name: Publish distribution to PyPI | |
if: github.event.action == 'published' && !github.event.release.prerelease | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} |