From fbfb7aa594399eab4ac4cae4ba7f3d344da54e07 Mon Sep 17 00:00:00 2001 From: k1nd0ne Date: Sun, 1 Dec 2024 15:31:41 +0100 Subject: [PATCH] Updating CI --- .github/workflows/CI.yml | 48 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a87af1..488396f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -# This file is autogenerated by maturin v1.6.0 +# This file is autogenerated by maturin v1.7.6 # To update, run # # maturin generate-ci github @@ -11,7 +11,7 @@ on: - main - master tags: - - '*' + - "*" pull_request: workflow_dispatch: @@ -24,17 +24,17 @@ jobs: strategy: matrix: platform: - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86_64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: aarch64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: armv7 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: s390x - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: ppc64le steps: - uses: actions/checkout@v4 @@ -46,7 +46,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v4 @@ -59,13 +59,13 @@ jobs: strategy: matrix: platform: - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86_64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: x86 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: aarch64 - - runner: ubuntu-latest + - runner: ubuntu-22.04 target: armv7 steps: - uses: actions/checkout@v4 @@ -77,7 +77,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" manylinux: musllinux_1_2 - name: Upload wheels uses: actions/upload-artifact@v4 @@ -105,7 +105,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -117,7 +117,7 @@ jobs: strategy: matrix: platform: - - runner: macos-12 + - runner: macos-13 target: x86_64 - runner: macos-14 target: aarch64 @@ -131,7 +131,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter - sccache: 'true' + sccache: "true" - name: Upload wheels uses: actions/upload-artifact@v4 with: @@ -156,11 +156,23 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} needs: [linux, musllinux, windows, macos, sdist] + permissions: + # Use to sign the release artifacts + id-token: write + # Used to upload release artifacts + contents: write + # Used to generate artifact attestation + attestations: write steps: - uses: actions/download-artifact@v4 + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-path: "wheels-*/*" - name: Publish to PyPI + if: "startsWith(github.ref, 'refs/tags/')" uses: PyO3/maturin-action@v1 env: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}