p12 2 #37
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: deploy-pypi | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
name: Publish python distribution to PyPI | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install twine and wheel | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade twine | |
python -m pip install --upgrade wheel | |
- name: Build distribution | |
run: | | |
python setup.py sdist | |
python setup.py bdist_wheel | |
twine check dist/* | |
- name: Publish to PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |