deploy.yml 734 B

12345678910111213141516171819202122232425262728
  1. name: deploy
  2. on: push
  3. concurrency:
  4. group: ${{ github.workflow }}-${{ github.ref }}
  5. cancel-in-progress: true
  6. jobs:
  7. build-n-publish:
  8. runs-on: ubuntu-latest
  9. if: startsWith(github.event.ref, 'refs/tags')
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Set up Python 3.7
  13. uses: actions/setup-python@v2
  14. with:
  15. python-version: 3.7
  16. - name: Install torch
  17. run: pip install torch
  18. - name: Install wheel
  19. run: pip install wheel
  20. - name: Build MMDetection
  21. run: python setup.py sdist bdist_wheel
  22. - name: Publish distribution to PyPI
  23. run: |
  24. pip install twine
  25. twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}