Skip to content

Commit 59ec00a

Browse files
committed
ci(build): 优化 GitHub Actions 构建流程
- 更新构建产物下载链接格式,使其动态指向实际构建产物 - 添加构建信息到发布说明中,包括构建时间、提交信息和构建分支 - 改进 Artifact 文件匹配模式,提高灵活性 - 在构建日志中添加 Zip 文件信息输出,提高透明度
1 parent 9d00b48 commit 59ec00a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,21 @@ jobs:
152152
## Text2Voice Release ${{ github.ref_name }}
153153
154154
### 下载
155-
- Windows: [Text2Voice-windows-latest.zip](Text2Voice-windows-latest.zip)
156-
- macOS: [Text2Voice-macos-latest.zip](Text2Voice-macos-latest.zip)
157-
- Linux: [Text2Voice-ubuntu-latest.zip](Text2Voice-ubuntu-latest.zip)
155+
- [Windows 版本 (Text2Voice-windows-latest.zip)](https://github.com/xdlee110/text2voice/releases/download/${{ github.ref_name }}/Text2Voice-windows-latest.zip)
156+
- [macOS 版本 (Text2Voice-macos-latest.zip)](https://github.com/xdlee110/text2voice/releases/download/${{ github.ref_name }}/Text2Voice-macos-latest.zip)
157+
- [Linux 版本 (Text2Voice-ubuntu-latest.zip)](https://github.com/xdlee110/text2voice/releases/download/${{ github.ref_name }}/Text2Voice-ubuntu-latest.zip)
158158
159159
### 更新内容
160160
- 请在此处添加版本更新说明
161+
162+
### 构建信息
163+
- 构建时间: ${{ github.event.head_commit.timestamp }}
164+
- 提交信息: ${{ github.event.head_commit.message }}
165+
- 构建分支: ${{ github.ref_name }}
161166
draft: false
162167
prerelease: false
163-
files: Text2Voice-*.zip # 简化文件匹配模式
168+
files: |
169+
Text2Voice-*.zip
164170
env:
165171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166172

@@ -177,6 +183,10 @@ jobs:
177183
fi
178184
cd ..
179185
ls -la Text2Voice-*.zip
186+
echo "Zip files created:"
187+
for f in Text2Voice-*.zip; do
188+
echo "- $f ($(stat -f%z "$f" 2>/dev/null || stat -c%s "$f") bytes)"
189+
done
180190
181191
- name: Upload Artifacts
182192
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)