Skip to content

Commit

Permalink
Merge pull request #215 from Mossaka/fix-release
Browse files Browse the repository at this point in the history
fix: add a stat condition check for uploading release binaries
  • Loading branch information
Mossaka authored Jul 31, 2023
2 parents d02c2c0 + bc1ddbc commit 71df77d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,15 @@ jobs:
- name: Create release
run: |
gh release create ${{ github.ref }} --generate-notes --prerelease
for i in release/*/*; do
gh release upload ${RELEASE_NAME} $i
done
# skip upload if there are no files
if stat release/*/* >/dev/null 2>&1; then
for i in release/*/*; do
gh release upload ${RELEASE_NAME} $i
done
else
echo "No files to upload"
exit 0
fi
env:
GH_TOKEN: ${{ github.token }}
RELEASE_NAME: ${{ needs.generate.outputs.crate }}/${{ needs.generate.outputs.version }}
Expand Down

0 comments on commit 71df77d

Please sign in to comment.