name: Publish to PyPI on: push: tags: - 'v*' jobs: publish_to_pypi: name: Push Package to PyPI runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.x' - name: Install dependencies run: pip install build - name: Build package run: python -m build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}