9999
100100 - name : Install fastforge
101101 run : dart pub global activate fastforge
102-
102+
103+ - name : Decode MSIX Certificate
104+ shell : pwsh
105+ run : |
106+ $certBase64 = "${{ secrets.CERTIFICATE }}"
107+ if ([string]::IsNullOrEmpty($certBase64)) { Write-Error "Secret CERTIFICATE is empty!"; exit 1 }
108+ $certBytes = [System.Convert]::FromBase64String($certBase64)
109+
110+ $certPath = Join-Path -Path (Get-Location) -ChildPath "CERTIFICATE.pfx"
111+ [IO.File]::WriteAllBytes($certPath, $certBytes)
112+
113+ echo "MSIX_CERT_PATH=$certPath" >> $env:GITHUB_ENV
103114 - name : Get version from pubspec.yaml
104115 id : get_version
105116 shell : pwsh
@@ -114,20 +125,38 @@ jobs:
114125 }
115126 Write-Error "Version not found"; exit 1
116127
117- - name : Package Windows exe
118- run : fastforge package --platform windows --targets exe
128+ # 👇 关键修改:同时打包 exe 和 msix
129+ - name : Package Windows (exe + msix)
130+ run : fastforge package --platform windows --targets exe,msix
119131
120- - name : Rename installer
132+ - name : Rename installers
133+ shell : pwsh
134+ env :
135+ MSIX_CERT_PATH : ${{ env.MSIX_CERT_PATH }}
136+ MSIX_CERT_PASSWORD : xxxx
121137 run : |
122138 $VERSION = "${{ steps.get_version.outputs.version }}"
123- $SRC = Get-ChildItem "dist\$VERSION" -Filter "*.exe" | Select-Object -First 1
124- Copy-Item $SRC.FullName "PureLive-$VERSION-windows-x64-setup.exe"
139+ $DIST_DIR = "dist"
125140
126- - name : 上传Windows安装包
141+ # Find and rename .exe
142+ $EXE_FILE = Get-ChildItem $DIST_DIR -Recurse -Filter "*.exe" | Select-Object -First 1
143+ if ($EXE_FILE) {
144+ Copy-Item $EXE_FILE.FullName "PureLive-$VERSION-windows-x64-setup.exe"
145+ }
146+
147+ # Find and rename .msix
148+ $MSIX_FILE = Get-ChildItem $DIST_DIR -Recurse -Filter "*.msix" | Select-Object -First 1
149+ if ($MSIX_FILE) {
150+ Copy-Item $MSIX_FILE.FullName "PureLive-$VERSION-windows-x64.msix"
151+ }
152+
153+ - name : 上传Windows安装包(exe + msix)
127154 uses : actions/upload-artifact@v4
128155 with :
129156 name : windows-installer
130- path : PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
157+ path : |
158+ PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
159+ PureLive-${{ steps.get_version.outputs.version }}-windows-x64.msix
131160 retention-days : 1
132161
133162 build-macos :
@@ -214,6 +243,8 @@ jobs:
214243 |Windows/macOS/Android版|[pure_live](https://github.com/liuchuancong/pure_live/releases/latest)|
215244
216245 ### 🖥️ Windows 版
246+ - **EXE 安装包**:适合所有用户,自动创建快捷方式
247+ - **MSIX 包**:现代应用格式,支持干净卸载(需 Windows 10/11)
217248 - 适配:Win10/11 (x64),自动创建桌面快捷方式
218249 - 功能:多直播源、WebDAV、弹幕显示
219250 - 快捷键:空格(播放/暂停) \| ESC(全屏切换) \| 上下键(音量) \| R(刷新)
@@ -244,6 +275,7 @@ jobs:
244275 artifacts/android-apks/app-arm64-v8a-release.apk
245276 artifacts/android-apks/app-x86_64-release.apk
246277 artifacts/windows-installer/*.exe
278+ artifacts/windows-installer/*.msix
247279 artifacts/macos-dmg/*.dmg
248280
249281 - name : 输出状态
0 commit comments