Skip to content

Commit e0f2b93

Browse files
committed
add version config
1 parent ce604d9 commit e0f2b93

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,17 @@ jobs:
8383
Invoke-RestMethod -Uri "$alistUrl/api/fs/put" -Method Put -InFile $appxFile.FullName -Headers $headers
8484
8585
Write-Host "Upload complete: $remotePath"
86+
87+
- name: Update AppInstaller Config
88+
shell: powershell
89+
run: |
90+
# 1. 获取构建好的 Appx 文件名来提取版本号
91+
$appxFile = Get-ChildItem -Path "Packaging" -Filter "MaiChartManager_Canary_*.appx" | Select-Object -First 1
92+
if (-not $appxFile) { throw "Appx file not found for version extraction!" }
93+
94+
# 2. 提取版本号 (假设文件名格式为 MaiChartManager_Canary_1.2.3.4.appx)
95+
$version = $appxFile.Name -replace 'MaiChartManager_Canary_', '' -replace '.appx', ''
96+
Write-Host "Detected Version: $version"
97+
98+
# 3. 执行更新脚本
99+
& "D:\sign\mcm-canary-update.ps1" -Version $version

0 commit comments

Comments
 (0)