From 1170f635fddd78749a4f6947f8210c3e6ec6799a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 10 Jun 2025 21:10:27 +0800 Subject: [PATCH] build: keep release files as before --- .github/workflows/release.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7555137e..073e30f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -171,11 +171,23 @@ jobs: # 为每个二进制文件创建 zip 包 cd dist for bin in certimate_*; do - if [[ "$bin" == *".exe" ]]; then - zip "${bin%.exe}.zip" "${bin}" + if [[ "$bin" == *".exe" ]]; then + entrypoint="certimate.exe" else - zip -X "${bin}.zip" "${bin}" + entrypoint="certimate" fi + + tmpdir=$(mktemp -d) + cp "$bin" "${tmpdir}/${entrypoint}" + cp ../README.md ../LICENSE.md ../CHANGELOG.md "$tmpdir" + + if [[ "$bin" == *".exe" ]]; then + zip -j "${bin%.exe}.zip" "$tmpdir"/* + else + zip -j -X "${bin}.zip" "$tmpdir"/* + fi + + rm -rf "$tmpdir" done # 创建校验和文件 @@ -190,4 +202,3 @@ jobs: draft: true env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} -