From 5ec4a5d730e5558854d912d4b013f223368d5138 Mon Sep 17 00:00:00 2001 From: gsilvestrin Date: Mon, 12 Jun 2023 14:54:54 -0700 Subject: [PATCH] feat(python): add action to build and publish wheel (#179) --- .github/workflows/pypi-publish.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 00000000..9b43d88c --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,31 @@ +name: PyPI Publish + +on: + release: + types: [ published ] + tags: + - 'python-v*' # Push events that matches the python-make-release action + +jobs: + publish: + runs-on: ubuntu-latest + defaults: + run: + shell: bash + working-directory: python + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.8" + - name: Build distribution + run: | + ls -la + pip install wheel setuptools --upgrade + python setup.py sdist bdist_wheel + - name: Publish + uses: pypa/gh-action-pypi-publish@v1.8.5 + with: + password: ${{ secrets.LANCEDB_PYPI_API_TOKEN }} + packages-dir: python/dist