From 64e2977b39c7e1b3b6fbad6e003f7800139e2913 Mon Sep 17 00:00:00 2001 From: joshuarli Date: Fri, 20 Sep 2024 00:22:40 -0700 Subject: [PATCH] ci: update actions/upload-artifact to v4 with merge (#3545) --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e6415b65..7cd7847e42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,14 @@ jobs: # This will also trigger "make dist" that creates the Python packages make aws-lambda-layer - name: Upload Python Packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ github.sha }} + name: artifact-build_lambda_layer path: | dist/* + if-no-files-found: 'error' + # since this artifact will be merged, compression is not necessary + compression-level: '0' docs: name: Build SDK API Doc @@ -91,7 +94,23 @@ jobs: make apidocs cd docs/_build && zip -r gh-pages ./ - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 + with: + name: artifact-docs + path: | + docs/_build/gh-pages.zip + 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: [build_lambda_layer, docs] + 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 }} - path: docs/_build/gh-pages.zip + pattern: artifact-* + delete-merged: true