From 98d9285f71e6ed120faa558c07cc9a7a42cebf6c Mon Sep 17 00:00:00 2001 From: Jiaxin Shan Date: Mon, 16 Dec 2024 11:05:45 -0800 Subject: [PATCH] Fix the GITHUB_WORKSPACE artifact sharing issue in release workflow (#532) * Bump upload & download artifact plugin to v4 * Fix the GITHUB_WORKSPACE artifact sharing issue GITHUB_WORKSPACE will be reset in each job step which makes artifact not sharable between artifact build and upload steps. --------- Signed-off-by: Jiaxin Shan --- .github/workflows/release-build.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index f1529c6f..ff5a3bf6 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -81,13 +81,12 @@ jobs: run: | cd python/aibrix poetry build - mkdir -p $GITHUB_WORKSPACE/artifacts - cp dist/* $GITHUB_WORKSPACE/artifacts/ + ls -al dist/* - name: Upload release artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: aibrix-python-packages - path: $GITHUB_WORKSPACE/artifacts/ + path: python/aibrix/dist/*.whl artifact-release: runs-on: ubuntu-latest @@ -110,13 +109,13 @@ jobs: # Upload the Kustomize YAML as a release artifact - name: Upload Kustomize YAML - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: aibrix-dependency-${{ github.ref_name }}.yaml path: aibrix-dependency-${{ github.ref_name }}.yaml - name: Upload Kustomize YAML - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: aibrix-core-${{ github.ref_name }}.yaml path: aibrix-core-${{ github.ref_name }}.yaml @@ -132,17 +131,17 @@ jobs: # Download the Kustomize artifact from the previous job - name: Download Kustomize YAML - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: aibrix-dependency-${{ github.ref_name }}.yaml - name: Download Kustomize YAML - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: aibrix-core-${{ github.ref_name }}.yaml - name: Download PYTHON wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: aibrix-python-packages @@ -172,4 +171,6 @@ jobs: prerelease: ${{ env.prerelease }} files: | aibrix-dependency-${{ github.ref_name }}.yaml - aibrix-core-${{ github.ref_name }}.yaml \ No newline at end of file + aibrix-core-${{ github.ref_name }}.yaml + aibrix-*.whl + aibrix-python-packages/aibrix-*.whl \ No newline at end of file