From 88aa7e156af2d91652514aed168521d7b4b8fcae Mon Sep 17 00:00:00 2001 From: fujie Date: Sat, 3 Jan 2026 16:13:22 +0800 Subject: [PATCH] fix: check for files before gh release upload to prevent empty file error --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f11cc37..a13d64c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -341,7 +341,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - find release_plugins -type f -name "*.py" -print0 | xargs -0 gh release upload ${{ steps.version.outputs.version }} --clobber + # Check if there are any .py files to upload + if [ -d release_plugins ] && [ -n "$(find release_plugins -type f -name '*.py' 2>/dev/null)" ]; then + echo "Uploading plugin files..." + find release_plugins -type f -name "*.py" -print0 | xargs -0 gh release upload ${{ steps.version.outputs.version }} --clobber + else + echo "No plugin files to upload. Skipping asset upload." + fi - name: Summary run: |