You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. # This workflow will upload a Python Package using Twine when a release is created
  2. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
  3. # This workflow uses actions that are not certified by GitHub.
  4. # They are provided by a third-party and are governed by
  5. # separate terms of service, privacy policy, and support
  6. # documentation.
  7. name: Upload Python Package
  8. on:
  9. release:
  10. types: [published]
  11. permissions:
  12. contents: read
  13. jobs:
  14. deploy:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. - name: Set up Python
  19. uses: actions/setup-python@v3
  20. with:
  21. python-version: '3.x'
  22. - name: Install dependencies
  23. run: |
  24. python -m pip install --upgrade pip
  25. pip install build
  26. - name: Build package
  27. run: python -m build
  28. - name: Publish package
  29. uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
  30. with:
  31. user: __token__
  32. password: ${{ secrets.PYPI_API_TOKEN }}