From c55187c9d25412747c804fa2eb64141b8d25c66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Fri, 13 Dec 2024 15:19:27 +0100 Subject: [PATCH] fix(ci): again --- .github/workflows/publish.yml | 36 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5550c11b..f8820fe9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -188,6 +188,7 @@ jobs: path: differt-core/dist release-differt-core: + if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt-core name: Release differt-core runs-on: ubuntu-latest needs: [linux, musllinux, windows, macos, sdist] @@ -212,21 +213,16 @@ jobs: subject-path: dist/differt-core-wheels-* - name: Publish to PyPI - if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt uses: PyO3/maturin-action@v1 with: command: upload - args: --non-interactive --skip-existing dist/differt-core-wheels-* + args: --non-interactive --skip-existing dist/differt-core-wheels-*/* working-directory: differt-core - build-and-release-differt: - name: Build and release differt + build-differt: + name: Build DiffeRT runs-on: ubuntu-latest environment: release - permissions: - id-token: write - contents: write - attestations: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -236,9 +232,6 @@ jobs: with: enable-cache: true - - name: Install dependencies - run: uv sync - - name: Build package run: uv build --package differt -o dist @@ -248,11 +241,30 @@ jobs: name: differt-wheels-and-sdist path: dist + release-differt: + if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt + name: Release DiffeRT + runs-on: ubuntu-latest + needs: [build-differt] + environment: release + permissions: + id-token: write + contents: write + attestations: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download build wheels + uses: actions/download-artifact@v4 + with: + path: dist + pattern: differt-wheels-and-sdist + - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: subject-path: dist/* - name: Publish to PyPI - if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt uses: pypa/gh-action-pypi-publish@release/v1