From a009d291087388ea583b891e7583219354d1e2d0 Mon Sep 17 00:00:00 2001 From: mzr1996 Date: Thu, 1 Sep 2022 00:13:26 +0800 Subject: [PATCH] Add deploy workflow. --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..08936cb2c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: deploy + +on: push + +jobs: + build-n-publish: + runs-on: ubuntu-latest + if: startsWith(github.event.ref, 'refs/tags') + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Build MMClassification + run: | + pip install wheel + python setup.py sdist bdist_wheel + - name: Publish distribution to PyPI + run: | + pip install twine + twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}