From 50aaa70829dc4e0832e5119092124ef1c6065b35 Mon Sep 17 00:00:00 2001 From: Marcelo Jorge Vieira Date: Tue, 17 Mar 2026 19:31:36 -0300 Subject: [PATCH] Add PyPI release workflow --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3765025 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: release + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + pull_request: + branches: + - master + +permissions: + contents: read + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.10" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + + - name: Build package + run: python -m build --sdist --wheel + + - name: Publish to PyPI + if: github.event_name != 'pull_request' + uses: pypa/gh-action-pypi-publish@v1.13.0 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true