Update pyproject.toml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python 🐍 client 📦 to PyPI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'client/**' # Only run workflow if changes in the package directory | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
- name: Configure Poetry | |
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
- name: Install dependencies | |
run: | | |
cd client | |
poetry install | |
- name: Build and publish | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
cd client | |
poetry publish --build |