From 3a0bf1237cd6e8e7f069a4d245730c314ea6bb1c Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Wed, 13 Nov 2024 10:51:10 +0100 Subject: [PATCH] Fix building in CI. Fix building in CI. --- .github/workflows/CI.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e761f98..693ceda 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -# This file is autogenerated by maturin v1.7.0 +# This file is autogenerated by maturin v1.7.4 # To update, run # # maturin generate-ci github --zig --pytest --platform manylinux macos @@ -38,7 +38,7 @@ jobs: with: target: ${{ matrix.platform.target }} args: --release --out dist --zig - sccache: 'true' + sccache: 'false' manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v4 @@ -84,7 +84,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: 3.12 - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -122,15 +122,25 @@ jobs: release: name: Release - environment: release runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" + environment: release + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} needs: [linux, 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 with: command: upload