From 9804bdc52bdf4e85e66ae11246453be5dc40a9c0 Mon Sep 17 00:00:00 2001 From: Chayim Date: Thu, 4 Nov 2021 13:55:33 +0200 Subject: [PATCH] publish to pypi as releases are generated with the release drafter (#1647) --- .github/workflows/pypi-publish.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pypi-publish.yaml diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml new file mode 100644 index 0000000000..b842c36670 --- /dev/null +++ b/.github/workflows/pypi-publish.yaml @@ -0,0 +1,31 @@ +name: Publish tag to Pypi + +on: + release: + types: [published] + +jobs: + + build_and_package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: install python + uses: actions/setup-python@v2 + with: + python-version: 3.0 + - name: Install dev tools + run: | + pip install -r dev_requirements.txt + pip install twine wheel + + - name: Build package + run: | + python setup.py build + python setup.py dist bdist_wheel + + - name: Publish to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}