Skip to content

Commit ff13d3d

Browse files
author
liuchuancong
committed
fix(release)
1 parent f7023ba commit ff13d3d

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ jobs:
160160
foreach ($line in $lines) {
161161
if ($line -match '^\s*version:\s*(\S+)') {
162162
$v = $matches[1] -replace '[`"''`]', ''
163-
"version=$v" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
164-
Write-Host "✅ Version: $v"
163+
$cleanVersion = ($v -split '\+')[0]
164+
"version=$cleanVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
165+
166+
Write-Host "✅ Version: $cleanVersion"
165167
exit 0
166168
}
167169
}
@@ -178,7 +180,7 @@ jobs:
178180
179181
# fastforge 生成的文件通常在 dist 目录中
180182
$DIST_DIR = "dist\$VERSION"
181-
$INSTALLER_NAME = "PureLive-windows-x64-setup.exe"
183+
$INSTALLER_NAME = "PureLive-$VERSION-windows-x64-setup.exe"
182184
183185
# 查找生成的 exe 文件
184186
Get-ChildItem "$DIST_DIR" -Filter "*.exe" | ForEach-Object {
@@ -193,7 +195,7 @@ jobs:
193195
uses: actions/upload-artifact@v4
194196
with:
195197
name: windows-installer
196-
path: PureLive-windows-x64-setup.exe
198+
path: PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
197199
retention-days: 1
198200

199201
# 读取版本信息
@@ -212,7 +214,7 @@ jobs:
212214
prerelease: false
213215
token: ${{ secrets.TOKEN }}
214216
files: |
215-
PureLive-windows-x64-setup.exe
217+
PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
216218
217219
# 完成
218220
- name: 输出任务状态

lib/modules/about/widgets/version_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class NewVersionDialog extends StatelessWidget {
3333
final apkUrl =
3434
'${VersionUtil.projectUrl}/releases/download/v${VersionUtil.latestVersion}/app-armeabi-v7a-release.apk';
3535
final windowsExecutableUrl =
36-
'${VersionUtil.projectUrl}/releases/download/v${VersionUtil.latestVersion}/PureLive-windows-x64-setup.exe';
36+
'${VersionUtil.projectUrl}/releases/download/v${VersionUtil.latestVersion}/PureLive-${VersionUtil.version}-windows-x64-setup.exe';
3737

3838
return AlertDialog(
3939
title: Text(S.of(context).check_update),

0 commit comments

Comments
 (0)