deploy.yaml 759 B

123456789101112131415161718192021222324252627282930313233
  1. name: Deploy
  2. on:
  3. release:
  4. types: [published]
  5. defaults:
  6. run:
  7. shell: bash
  8. jobs:
  9. deploy-pypi:
  10. name: Deploy to PyPI
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Check out repository
  14. uses: actions/checkout@v3
  15. with:
  16. fetch-depth: 0
  17. - uses: ./.github/actions/setup
  18. with:
  19. python-version: "3.9"
  20. venv-id: "deploy"
  21. poetry-dependency-install-flags: "--all-extras"
  22. - name: Run tests
  23. run: |
  24. poetry run pytest -r a src tests --doctest-modules
  25. - name: Publish to PyPI
  26. env:
  27. PYPI_TOKEN: "${{ secrets.PYPI_TOKEN }}"
  28. run: |
  29. poetry config pypi-token.pypi $PYPI_TOKEN
  30. poetry publish --build --no-interaction