pypi.yml 722 B

12345678910111213141516171819202122232425262728293031
  1. on:
  2. release:
  3. types:
  4. - created
  5. jobs:
  6. deploy:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v3
  10. - name: Setup python
  11. uses: actions/setup-python@v4
  12. with:
  13. python-version: "3.x"
  14. - name: Install dependencies
  15. run: |
  16. python -m pip install --upgrade pip
  17. python -m pip install wheel
  18. - name: Build
  19. run: |
  20. python setup.py sdist bdist_wheel
  21. - name: Publish to PyPI
  22. if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
  23. uses: pypa/gh-action-pypi-publish@release/v1.5
  24. with:
  25. user: __token__
  26. password: ${{ secrets.PYPI_API_TOKEN }}