Compare commits

...

3 Commits

Author SHA1 Message Date
baiiylu
cee5e1d36a Merge pull request #4 from iOSleep/master
feat: 增加构建版本号
2026-02-12 13:16:58 +00:00
maxu
19faefdc2b feat: 增加构建版本号 2026-01-07 17:13:43 +08:00
baiiylu
d143963ae2 Update macOS runner version in workflow 2025-12-26 09:08:47 +08:00
2 changed files with 5 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ on:
jobs:
save_new_wechat:
runs-on: macos-13
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
# - name: Test Github Action Server Time

View File

@@ -92,6 +92,9 @@ get_version() {
# 使用 grep 和 sed 提取版本号
VERSION=$(grep -A1 '<key>CFBundleShortVersionString</key>' "$INFO_PLIST" | grep '<string>' | sed -E 's/.*<string>([^<]+)<\/string>.*/\1/')
# 使用 grep 和 sed 提取构建版本号
BUILD_VERSION=$(grep -A1 '<key>CFBundleVersion</key>' "$INFO_PLIST" | grep '<string>' | sed -E 's/.*<string>([^<]+)<\/string>.*/\1/')
# 卸载 dmg
hdiutil detach "$MOUNT_DIR"
@@ -125,6 +128,7 @@ prepare_commit() {
cat > "$VERSION_DIR/WeChatMac-$VERSION.dmg.sha256" <<EOF
DestVersion: $VERSION
DestBuild: $BUILD_VERSION
Sha256: $NOW_SUM256
UpdateTime: $(date -u '+%Y-%m-%d %H:%M:%S') (UTC)
DownloadFrom: $DOWNLOAD_LINK