Skip to content

Commit 55d2cc4

Browse files
committed
ci(github-actions): Configure UWP workload and fix build script format
- Add UWP workload installation steps to the CI process - Adjust the space format replaced by regular expressions to enhance readability - Configure the main project properties for the packaging project to optimize MSIX packaging and building
1 parent 1c32271 commit 55d2cc4

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,20 @@ jobs:
216216
- name: Setup MSBuild
217217
uses: microsoft/setup-msbuild@v2
218218

219+
- name: Install UWP workload
220+
shell: pwsh
221+
run: |
222+
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
223+
$installer = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
224+
225+
Write-Host "VS Path: $vsPath"
226+
Write-Host "Installing UWP workload..."
227+
228+
$args = "modify --installPath `"$vsPath`" --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 --quiet --norestart --wait"
229+
Start-Process -FilePath $installer -ArgumentList $args -NoNewWindow -Wait
230+
231+
Write-Host "UWP workload installation complete"
232+
219233
- name: List Windows SDKs
220234
shell: pwsh
221235
run: |
@@ -230,19 +244,19 @@ jobs:
230244
231245
- name: Build MSIX x64
232246
run: |
233-
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"', 'ProcessorArchitecture="x64"' | Set-Content "DevTools.Package\Package.appxmanifest"
247+
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"' , 'ProcessorArchitecture="x64"' | Set-Content "DevTools.Package\Package.appxmanifest"
234248
msbuild DevTools.Package\DevTools.Package.wapproj /p:Configuration=Release /p:Platform=x64 /p:AppxPackageDir=AppPackages\x64\ /t:Build /p:RestorePackages=true
235249
shell: pwsh
236250

237251
- name: Build MSIX x86
238252
run: |
239-
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"', 'ProcessorArchitecture="x86"' | Set-Content "DevTools.Package\Package.appxmanifest"
253+
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"' , 'ProcessorArchitecture="x86"' | Set-Content "DevTools.Package\Package.appxmanifest"
240254
msbuild DevTools.Package\DevTools.Package.wapproj /p:Configuration=Release /p:Platform=x86 /p:AppxPackageDir=AppPackages\x86\ /t:Build /p:RestorePackages=true
241255
shell: pwsh
242256

243257
- name: Build MSIX arm64
244258
run: |
245-
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"', 'ProcessorArchitecture="arm64"' | Set-Content "DevTools.Package\Package.appxmanifest"
259+
(Get-Content "DevTools.Package\Package.appxmanifest") -replace 'ProcessorArchitecture="[^"]*"' , 'ProcessorArchitecture="arm64"' | Set-Content "DevTools.Package\Package.appxmanifest"
246260
msbuild DevTools.Package\DevTools.Package.wapproj /p:Configuration=Release /p:Platform=arm64 /p:AppxPackageDir=AppPackages\arm64\ /t:Build /p:RestorePackages=true
247261
shell: pwsh
248262

DevTools.Package/DevTools.Package.wapproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
</ItemGroup>
5454
<ItemGroup>
5555
<ProjectReference Include="..\DevTools.csproj">
56-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
56+
<Name>DevTools</Name>
57+
<IsAppxMainProject>true</IsAppxMainProject>
5758
</ProjectReference>
5859
</ItemGroup>
5960
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

0 commit comments

Comments
 (0)