Skip to content

Commit 71df77d

Browse files
authored
Merge pull request #215 from Mossaka/fix-release
fix: add a stat condition check for uploading release binaries
2 parents d02c2c0 + bc1ddbc commit 71df77d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,15 @@ jobs:
9999
- name: Create release
100100
run: |
101101
gh release create ${{ github.ref }} --generate-notes --prerelease
102-
for i in release/*/*; do
103-
gh release upload ${RELEASE_NAME} $i
104-
done
102+
# skip upload if there are no files
103+
if stat release/*/* >/dev/null 2>&1; then
104+
for i in release/*/*; do
105+
gh release upload ${RELEASE_NAME} $i
106+
done
107+
else
108+
echo "No files to upload"
109+
exit 0
110+
fi
105111
env:
106112
GH_TOKEN: ${{ github.token }}
107113
RELEASE_NAME: ${{ needs.generate.outputs.crate }}/${{ needs.generate.outputs.version }}

0 commit comments

Comments
 (0)