From 98a8bbcfad5ea981b1590a9cf3a34125289bd5d0 Mon Sep 17 00:00:00 2001 From: linyiqi Date: Wed, 24 Nov 2021 08:28:57 +0800 Subject: [PATCH] Add publish to pypi --- .github/workflows/publish-to-pypi.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..3b83dbe --- /dev/null +++ b/.github/workflows/publish-to-pypi.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@v1 + with: + python-version: 3.7 + - name: Build MMFewShot + 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 }}