From a189862d58e1b8e1a5770571c2bdd6c4eb72ac45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AB=E6=88=91=E5=B0=8F=E6=9D=A8=E5=90=8C=E5=AD=A6?= <188421097+HunYiSage@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:43:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Release=20=E5=85=88=E5=BB=BA=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=86=8D=E5=8D=95=E7=8B=AC=E6=8C=82=E4=B8=8A=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 压缩包为空时这次发布失败,避免页面上只有说明没有安装包。 Co-authored-by: Cursor --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6f91c8..ac05c6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,13 +41,15 @@ jobs: if git rev-parse -q --verify "refs/tags/${tag}^{}" >/dev/null; then commit="$(git rev-parse "refs/tags/${tag}^{}")" git archive --format=zip --prefix="dsh-purge-${version}/" --output="$zip" "$commit" - gh release create "$tag" "$zip" --title "$tag" --notes-file release-notes.md + gh release create "$tag" --title "$tag" --notes-file release-notes.md else git archive --format=zip --prefix="dsh-purge-${version}/" --output="$zip" HEAD - args=(release create "$tag" "$zip" --target "$GITHUB_SHA" --title "$tag" --notes-file release-notes.md) + args=(release create "$tag" --target "$GITHUB_SHA" --title "$tag" --notes-file release-notes.md) case "$version" in *beta*|*alpha*|*rc*) args+=(--prerelease) ;; esac gh "${args[@]}" fi + test -s "$zip" + gh release upload "$tag" "$zip" --clobber echo "published https://github.com/YuJunZhiXue/dsh-purge/releases/tag/${tag}"