pythonpublish.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Upload Python Package
  2. on:
  3. push:
  4. tags:
  5. - dulwich-*
  6. branches:
  7. - master
  8. jobs:
  9. deploy:
  10. runs-on: ${{ matrix.os }}
  11. strategy:
  12. matrix:
  13. os: [ubuntu-latest, macos-latest, windows-latest]
  14. python-version: ['3.x']
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Set up Python ${{ matrix.python-version }}
  18. uses: actions/setup-python@v2
  19. with:
  20. python-version: ${{ matrix.python-version }}
  21. - name: Install dependencies
  22. run: |
  23. python -m pip install --upgrade pip
  24. pip install setuptools wheel twine fastimport
  25. - name: Build
  26. run: |
  27. python setup.py sdist bdist_wheel
  28. mkdir wheelhouse
  29. mv dist/*.whl wheelhouse
  30. if: "matrix.os != 'ubuntu-latest'"
  31. - name: Build and publish (Linux)
  32. uses: RalfG/python-wheels-manylinux-build@v0.2.2
  33. if: "matrix.os == 'ubuntu-latest'"
  34. - name: Publish
  35. env:
  36. TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
  37. TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
  38. run: |
  39. echo twine upload wheelhouse/*