From 0279b1136ea05d51b0d2362b1970d7aa481e5c09 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sat, 6 Jul 2024 08:49:24 +0800 Subject: [PATCH] Fix version number --- .github/workflows/Build-WeChatFerry.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build-WeChatFerry.yml b/.github/workflows/Build-WeChatFerry.yml index 5dfc94d..3db14c7 100644 --- a/.github/workflows/Build-WeChatFerry.yml +++ b/.github/workflows/Build-WeChatFerry.yml @@ -15,8 +15,9 @@ jobs: - name: 获取版本号和微信版本号 run: | - $version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() + $version_full = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "FileVersion", "(.*)"').Matches.Groups[1].Value.Trim() $wechat_version = (Select-String -Path "WeChatFerry/spy/spy.rc" -Pattern 'VALUE "ProductVersion", "(.*)"').Matches.Groups[1].Value.Trim() + $version = $version_full -replace '(\d+\.\d+\.\d+)\.\d+', '$1' echo "version=$version" >> $env:GITHUB_ENV echo "wechat_version=$wechat_version" >> $env:GITHUB_ENV echo "Program Version: $version"