pythonpublish.yml 664 B

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