# 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.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@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}