pythonpublish.yml 653 B

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