From 5b5caf09af6b4623d71e014203816b524b51e4b4 Mon Sep 17 00:00:00 2001 From: pyoor Date: Wed, 10 Jun 2026 11:42:07 -0400 Subject: [PATCH] ci: use PyPI trusted publisher (OIDC) for publishing --- .github/workflows/ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3a8fdbe..52b23294 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,8 @@ jobs: if: github.event_name == 'release' needs: test runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 @@ -79,13 +81,15 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - - name: Install tox - run: python -m pip install --upgrade tox + - name: Install build + run: python -m pip install --upgrade build - - name: Publish to PyPI - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: tox -e pypi + - name: Build package + run: python -m build + + - name: Upload to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true