From 8e1419fda61978d697f70c5b46b974a0f977f651 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 17 Sep 2024 12:15:43 -0700 Subject: [PATCH 1/5] init --- .github/workflows/ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e6415b65..c34978593d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,9 +70,9 @@ 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/* @@ -91,7 +91,20 @@ jobs: make apidocs cd docs/_build && zip -r gh-pages ./ - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v4 with: - name: ${{ github.sha }} + name: artifact-docs path: docs/_build/gh-pages.zip + dist/* + + merge: + runs-on: ubuntu-latest + needs: [build_lambda_layer, docs] + steps: + - name: Merge Artifacts + uses: actions/upload-artifact@v4 + with: + # Craft expects release assets to be a single artifact named after the sha. + name: ${{ github.sha }} + pattern: artifact-* + delete-merged: true From 8a9fcd83455c6a0b7b5040f1816f45fdceacce40 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 17 Sep 2024 12:18:00 -0700 Subject: [PATCH 2/5] fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c34978593d..b39db83cfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: needs: [build_lambda_layer, docs] steps: - name: Merge Artifacts - uses: actions/upload-artifact@v4 + uses: actions/merge@v4 with: # Craft expects release assets to be a single artifact named after the sha. name: ${{ github.sha }} From 54b3e54ef53bcdf67a05d39e40f0db074230ac8c Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 17 Sep 2024 12:22:35 -0700 Subject: [PATCH 3/5] doh --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b39db83cfb..a840a82d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: needs: [build_lambda_layer, docs] steps: - name: Merge Artifacts - uses: actions/merge@v4 + uses: actions/upload-artifact/merge@v4 with: # Craft expects release assets to be a single artifact named after the sha. name: ${{ github.sha }} From 5da45bcc2c018175bd2ccf6f3914c91ef37b99b4 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 17 Sep 2024 12:35:52 -0700 Subject: [PATCH 4/5] fix and improve --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a840a82d73..650559c7a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,6 +75,9 @@ jobs: 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 @@ -94,8 +97,11 @@ jobs: - uses: actions/upload-artifact@v4 with: name: artifact-docs - path: docs/_build/gh-pages.zip - dist/* + 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: runs-on: ubuntu-latest From ddc831753f25d3e4b0263494aaf8c7f03587e691 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 17 Sep 2024 13:23:14 -0700 Subject: [PATCH 5/5] better name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 650559c7a5..7cd7847e42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,13 +104,13 @@ jobs: compression-level: '0' merge: + name: Create Release Artifact runs-on: ubuntu-latest needs: [build_lambda_layer, docs] steps: - - name: Merge Artifacts - uses: actions/upload-artifact/merge@v4 + - uses: actions/upload-artifact/merge@v4 with: - # Craft expects release assets to be a single artifact named after the sha. + # Craft expects release assets from github to be a single artifact named after the sha. name: ${{ github.sha }} pattern: artifact-* delete-merged: true