Skip to content

Update python-publish.yml #33

Update python-publish.yml

Update python-publish.yml #33

Workflow file for this run

name: Publish Python Package
on:
push:
tags:
- "v*.*.*" # Triggers on version tags like v0.1.0, v1.2.3, etc.
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # This ensures all tags are fetched
- name: Build and publish to PyPI
uses: JRubics/poetry-publish@v2.1
with:
python_version: "3.11" # Matches your pyproject.toml
poetry_version: "==2.0.1" # Current stable version
pypi_token: ${{ secrets.PYPI_TOKEN }}
poetry_install_options: "--without dev --sync" # Don't install dev dependencies
plugins: "poetry-plugin-export" # Required by your project
# Optional: Test on TestPyPI first
# repository_name: "testpypi"
# repository_url: "https://test.pypi.org/legacy/"