From 8164d65bed18b0b0de6a7ca6eeff05f8f3f0640d Mon Sep 17 00:00:00 2001 From: Amit Moryossef Date: Fri, 29 Jul 2022 14:43:37 +0200 Subject: [PATCH] add pypi distribution workflow --- .github/workflows/pypi-publish.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 0000000..d0ce990 --- /dev/null +++ b/.github/workflows/pypi-publish.yaml @@ -0,0 +1,29 @@ +name: Publish Python Package + +on: + release: + types: [ created ] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install wheel + - name: build a binary wheel dist + run: | + rm -rf dist + python setup.py bdist_wheel sdist + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@v1.2.2 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}