diff options
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r-- | .github/workflows/main.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d58e3e41..e281a2ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,3 +83,39 @@ jobs: platforms: ${{env.DOCKER_PLATFORMS}} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache,mode=max + + pypi: + runs-on: ubuntu-latest + steps: + + - name: Install pip + if: github.event_name == 'push' + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + if: github.event_name == 'push' + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + + - name: Publish distribution package to Test PyPI + if: github.event_name == 'push' + uses: pypa/gh-action-pypi-publish@master + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish distribution package to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_API_TOKEN }}
\ No newline at end of file |