From 4b6175c4dc112bcb8e59a48064b873c484f7221d Mon Sep 17 00:00:00 2001 From: Claudio Ferreira Filho Date: Thu, 26 Mar 2026 12:30:01 -0300 Subject: [PATCH] ci: add GitHub Actions workflow for PyPI publishing Automated publishing to PyPI when a version tag (v*) is pushed. Requires PYPI_TOKEN secret to be configured. Closes #126 Signed-off-by: Claudio Ferreira Filho --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4e7f1d9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install build tools + run: pip install build twine + + - name: Build package + run: python -m build + + - name: Publish to PyPI + run: twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}