# This workflow will upload a Python Package using Twine when a release is created # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. name: Upload Python Package on: workflow_dispatch: push: # Pattern matched against refs/tags tags: - 'v*' # Push events to every version tag jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.10.x' - name: Install dependencies run: | python -m pip install poetry poetry install - name: Build package run: poetry build - name: Smoke-test built package run: | python -m venv /tmp/smoke-venv /tmp/smoke-venv/bin/pip install --quiet dist/*.whl /tmp/smoke-venv/bin/python -c "from qdrant_client import QdrantClient; print('Import OK')" - name: Publish package uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}