Skip to content

Commit

Permalink
Fix the GITHUB_WORKSPACE artifact sharing issue in release workflow (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
Jeffwan authored Dec 16, 2024
1 parent 1b3619f commit 98d9285
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -172,4 +171,6 @@ jobs:
prerelease: ${{ env.prerelease }}
files: |
aibrix-dependency-${{ github.ref_name }}.yaml
aibrix-core-${{ github.ref_name }}.yaml
aibrix-core-${{ github.ref_name }}.yaml
aibrix-*.whl
aibrix-python-packages/aibrix-*.whl

0 comments on commit 98d9285

Please sign in to comment.