ci(workflow): 更新 GitHub Actions 发布配置和构建脚本

更新 action-gh-release 从 v1 到 v2
优化构建脚本,增加错误处理和命令检查
使用更安全的脚本编写方式,避免全局变量污染
改进跨平台构建的兼容性和可维护性
This commit is contained in:
539943419 committed 2025-08-22 01:54:01 +08:00
1 parent 97276224ee
commit f341159f1a
2 files changed
+61 -44

No files matched your search

+2 -2
View File
@@ -71,7 +71,7 @@ jobs:
- name: 创建自动发布
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: Auto-Build-${{ steps.version.outputs.date }}-${{ steps.version.outputs.sha_short }}
tag_name: auto-${{ steps.version.outputs.date }}-${{ steps.version.outputs.sha_short }}
@@ -80,4 +80,4 @@ jobs:
files: |
**/miao-directory*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}