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.
 
 
 
 
 

60 lines
1.6 KiB

  1. name: Deploy
  2. on:
  3. push:
  4. tags:
  5. - '*'
  6. env:
  7. libarchive_tag: v3.6.1
  8. jobs:
  9. build_wheels:
  10. name: Build wheels on
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Build wheels
  15. uses: pypa/cibuildwheel@v2.9.0
  16. env:
  17. CIBW_ENVIRONMENT: INCLUDE=/usr/local/include LIBARCHIVE_PREFIX=/usr/local
  18. CIBW_PYTHON_VERSIONS: 3.8,3.9,3.10
  19. CIBW_BEFORE_ALL: bash -x build-libarchive-lib.sh centos ${{ env.libarchive_tag }}
  20. - uses: actions/upload-artifact@v3
  21. with:
  22. path: ./wheelhouse/*.whl
  23. build_sdist:
  24. name: Build source distribution
  25. runs-on: ubuntu-latest
  26. steps:
  27. - uses: actions/checkout@v3
  28. - name: Build sdist
  29. run: pipx run build --sdist
  30. - uses: actions/upload-artifact@v3
  31. with:
  32. path: dist/*.tar.gz
  33. upload_pypi:
  34. needs: [build_wheels, build_sdist]
  35. runs-on: ubuntu-latest
  36. # upload to PyPI on every tag starting with 'v'
  37. if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
  38. # alternatively, to publish when a GitHub Release is created, use the following rule:
  39. # if: github.event_name == 'release' && github.event.action == 'published'
  40. steps:
  41. - uses: actions/download-artifact@v3
  42. with:
  43. # unpacks default artifact into dist/
  44. # if `name: artifact` is omitted, the action will create extra parent dir
  45. name: artifact
  46. path: dist
  47. - name: Deploy wheels to PyPI
  48. uses: pypa/gh-action-pypi-publish@release/v1
  49. with:
  50. password: ${{ secrets.PYPI_API_TOKEN }}