From b17226e7830e40e36c8be662d7195702c9c498cf Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Tue, 4 Feb 2025 16:32:25 +0100 Subject: [PATCH] build: Use artifact upload v4 --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d137aba4..d1ef5d34d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,10 +36,13 @@ jobs: # consumed by cargo and setup.py to obtain the target dir CARGO_BUILD_TARGET: ${{ matrix.target }} - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: - name: ${{ github.sha }} + name: artifact-macos-${{ matrix.target }} path: py/dist/* + if-no-files-found: "error" + # since this artifact will be merged, compression is not necessary + compression-level: "0" python-wheel-linux: strategy: @@ -63,10 +66,13 @@ jobs: name: Build in Docker (x86_64) run: make wheel-manylinux IMAGE=quay.io/pypa/"$MANYLINUX_VERSION"_x86_64 - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: - name: ${{ github.sha }} + name: artifact-linux-${{ matrix.target }} path: py/dist/* + if-no-files-found: "error" + # since this artifact will be merged, compression is not necessary + compression-level: "0" sdist: name: Python sdist @@ -81,7 +87,22 @@ jobs: - run: make sdist - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: - name: ${{ github.sha }} + name: artifact-sdist-${{ matrix.target }} path: py/dist/* + if-no-files-found: "error" + # since this artifact will be merged, compression is not necessary + compression-level: "0" + + merge: + name: Create Release Artifact + runs-on: ubuntu-latest + needs: [linux, macos, sdist] + steps: + - uses: actions/upload-artifact/merge@v4 + with: + # Craft expects release assets from github to be a single artifact named after the sha. + name: ${{ github.sha }} + pattern: artifact-* + delete-merged: true