Publish Package #3
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 Package | |
on: | |
workflow_dispatch: | |
jobs: | |
pypi: | |
name: Deploy to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel twine | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
# - name: Upload package to Test PyPI | |
# env: | |
# TWINE_USERNAME: __token__ | |
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PIQTURE_TOKEN }} | |
# run: | | |
# python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* | |
- name: Upload package to PyPI | |
if: github.ref == 'refs/heads/main' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
python -m twine upload dist/* |