From f5280e52b29d6ba67073be133dc50620ac7c0c6b Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 18 Oct 2024 10:56:19 +0200 Subject: [PATCH 1/3] Add a Publishing workflow --- .github/workflows/CI.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c2b1f14..a2586fa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,6 +9,9 @@ on: - '*' pull_request: workflow_dispatch: + release: + types: + - published permissions: contents: read @@ -172,17 +175,24 @@ jobs: name: wheels-sdist path: dist - release: - name: Release + publish: + name: Publish Python distributions to PyPI runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" + if: github.event_name == 'release' && github.event.action == 'published' needs: [linux, musllinux, windows, macos, sdist] + environment: + name: pypi + url: https://pypi.org/p/rfc3161-client + permissions: + # Used to sign the release's artifacts with sigstore-python. + # Used to publish to PyPI with Trusted Publishing. + id-token: write steps: - uses: actions/download-artifact@v4 - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} with: - command: upload - args: --non-interactive --skip-existing wheels-*/* + path: dist/ + - name: Publish distributions + uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true + verbose: true From 487a6004f42db4c0b8d805a8d6e939d92dcaaa19 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 18 Oct 2024 11:55:47 +0200 Subject: [PATCH 2/3] Fix workflow --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a2586fa..8ff5010 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -191,6 +191,7 @@ jobs: - uses: actions/download-artifact@v4 with: path: dist/ + merge-multiple: true - name: Publish distributions uses: pypa/gh-action-pypi-publish@release/v1 with: From d5abcc1d5d6288d6edc4727a87a4c422d5fba5dc Mon Sep 17 00:00:00 2001 From: dm Date: Fri, 18 Oct 2024 12:02:26 +0200 Subject: [PATCH 3/3] Update .github/workflows/CI.yml --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8ff5010..5f15b3f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -196,4 +196,3 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: attestations: true - verbose: true