| name: Upload to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3.0.2 | |
| - uses: actions/setup-python@v4.2.0 | |
| with: | |
| python-version: 3.x | |
| - run: pip install twine wheel | |
| - run: pip install -e . | |
| - run: python setup.py sdist bdist_wheel | |
| - run: twine upload --skip-existing dist/* | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |