File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,19 @@ jobs:
2222 - name : List zip files
2323 id : list_zips
2424 run : |
25- # Generate JSON array of filenames
26- files=$(ls dist/*.zip | xargs -n1 basename | jq -R -s -c 'split("\n")[:-1]')
25+ if compgen -G "dist/*.zip" > /dev/null; then
26+ files=$(ls dist/*.zip | xargs -n1 basename | jq -R -s -c 'split("\n")[:-1]')
27+ else
28+ files="[]"
29+ fi
2730 echo "files=$files" >> $GITHUB_OUTPUT
2831
32+ - name : Upload dist folder for next job
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : dist
36+ path : dist/
37+
2938 upload :
3039 needs : build
3140 runs-on : ubuntu-latest
3544 steps :
3645 - uses : actions/checkout@v4
3746
38- - name : Upload artifact
47+ - name : Download dist folder
48+ uses : actions/download-artifact@v4
49+ with :
50+ name : dist
51+ path : dist
52+
53+ - name : Upload individual artifact
3954 uses : actions/upload-artifact@v4
4055 with :
4156 name : ${{ matrix.file }}
You can’t perform that action at this time.
0 commit comments