2
0

pythonpublish.yml 765 B

1234567891011121314151617181920212223242526272829303132
  1. name: Upload Python Package
  2. on:
  3. release:
  4. types: [created]
  5. jobs:
  6. deploy:
  7. runs-on: ${{ matrix.os }}
  8. strategy:
  9. matrix:
  10. os: [ubuntu-latest, macos-latest, windows-latest]
  11. python-version: ['3.x']
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Set up Python
  15. uses: actions/setup-python@v2
  16. with:
  17. python-version: ${{ matrix.python-version }}
  18. - name: Install dependencies
  19. run: |
  20. python -m pip install --upgrade pip
  21. pip install setuptools wheel twine
  22. - name: Build and publish
  23. env:
  24. TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
  25. TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
  26. run: |
  27. python setup.py sdist bdist_wheel
  28. twine upload dist/*