From f2348355a049d31c2e1a545a592dab0876ed1c3f Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Fri, 13 Dec 2024 23:05:00 +0000 Subject: [PATCH] replace maturian upload with pypa action --- .github/workflows/python.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 67b7ed4..d348afd 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -211,17 +211,23 @@ jobs: publish_test: name: Release - runs-on: ubuntu-latest # TODO: add re-enable manylinux once earlier step is fixed # needs: [linux, musllinux, windows, macos, sdist] needs: [linux, windows, macos, sdist] environment: testpypi + permissions: + id-token: write + runs-on: ubuntu-latest + steps: - uses: actions/download-artifact@v4 - - name: Publish to TestPyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }} with: - command: upload - args: --non-interactive --skip-existing --repository-url="https://test.pypi.org/legacy" wheels-*/* + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + # Only skip existing distributions on testpypi (not on pypi). + # See https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#tolerating-release-package-file-duplicates + skip-existing: true