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.
 
 
 
 
 

57 lines
1.4 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
  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. if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
  37. steps:
  38. - uses: actions/download-artifact@v3
  39. with:
  40. # unpacks default artifact into dist/
  41. # if `name: artifact` is omitted, the action will create extra parent dir
  42. name: artifact
  43. path: dist
  44. - name: Deploy wheels to PyPI
  45. uses: pypa/gh-action-pypi-publish@release/v1
  46. with:
  47. password: ${{ secrets.PYPI_API_TOKEN }}