File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -32,32 +32,32 @@ jobs:
3232 config-file : release-please-config.json
3333 manifest-file : .release-please-manifest.json
3434
35- upload-release-assets :
36- needs : release-please
37- if : needs.release-please.outputs.release_created == 'true'
38- runs-on : ubuntu-latest
39-
40- steps :
41- - name : Checkout code
42- uses : actions/checkout@v4
43-
4435 - name : Download workflow artifacts
4536 uses : dawidd6/action-download-artifact@v6
4637 with :
4738 workflow : build.yml
4839 workflow_conclusion : success
4940 branch : ${{ github.event_name == 'push' && github.ref_name || github.event.workflow_run.head_branch }}
5041 path : artifacts
51- if_no_artifact_found : warn
42+ if_no_artifact_found : fail
43+
44+ - name : Wait for assets to be created
45+ id : wait-for-assets
46+ run : |
47+ while [ ! -d "artifacts" ] || [ -z "$(ls -A artifacts)" ]; do
48+ echo "Waiting for assets to be created..."
49+ sleep 10
50+ done
5251
5352 - name : Upload Release Assets
53+ if : steps.wait-for-assets.outputs.exit_code == '0'
5454 env :
5555 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5656 run : |
5757 if [ -d "artifacts" ] && [ "$(ls -A artifacts)" ]; then
5858 for file in artifacts/*/*.zip; do
59- gh release upload ${{ needs .release-please .outputs.tag_name }} "$file" --clobber
59+ gh release upload ${{ steps .release.outputs.tag_name }} "$file" --clobber
6060 done
61- else
61+ else
6262 echo "No artifacts found to upload"
6363 fi
You can’t perform that action at this time.
0 commit comments