Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
This commit is contained in:
Shawn Yuan 2025-06-03 12:40:10 +08:00
parent 8916442406
commit 12534a986f

View File

@ -25,60 +25,22 @@ steps:
- script: echo $(WinAppSDKVersion)
displayName: 'Display WinAppSDK Version Found'
- task: PowerShell@2
displayName: 'Set Prerelease Flag'
- task: DownloadPipelineArtifact@2
displayName: 'Download WindowsAppSDK'
inputs:
targetType: 'inline'
script: |
$prereleaseFlag = if ('${{ parameters.useExperimentalVersion }}' -eq 'true') { '-Prerelease' } else { '' }
Write-Host "##vso[task.setvariable variable=PrereleaseFlag]$prereleaseFlag"
buildType: 'specific'
project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d'
definition: '104083'
allowPartiallySucceededBuilds: ${{ parameters.useUnstableWinAppSDK }}
allowFailedBuilds: ${{ parameters.useUnstableWinAppSDK }}
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/release/${{ parameters.versionNumber }}-stable'
artifactName: 'WindowsAppSDK_Nuget_And_MSIX'
targetPath: '$(Build.SourcesDirectory)\localpackages'
- task: PowerShell@2
displayName: 'Query Available WinAppSDK Packages'
inputs:
targetType: 'inline'
script: |
Write-Host "Querying available Microsoft.WindowsAppSDK packages..."
$command = "nuget list Microsoft.WindowsAppSDK -Source `"https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json`"
$prereleaseFlag"
Write-Host "Command: $command"
Invoke-Expression $command
- task: NuGetCommand@2
displayName: 'Download WindowsAppSDK directly from NuGet'
condition: eq('${{ parameters.useUnstableWinAppSDK }}', 'true')
inputs:
command: 'custom'
arguments: >
install "Microsoft.WindowsAppSDK"
-Source "https://microsoft.pkgs.visualstudio.com/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json"
-Version "$(WinAppSDKVersion)"
-OutputDirectory "$(Build.SourcesDirectory)\localpackages\direct"
$(PrereleaseFlag)
- script: |
echo "Listing packages from direct download:"
if exist "$(Build.SourcesDirectory)\localpackages\direct" dir "$(Build.SourcesDirectory)\localpackages\direct"
echo "Listing packages from pipeline download:"
if exist "$(Build.SourcesDirectory)\localpackages\NugetPackages" dir "$(Build.SourcesDirectory)\localpackages\NugetPackages"
- script: dir $(Build.SourcesDirectory)\localpackages\NugetPackages
displayName: 'List downloaded packages'
# - task: DownloadPipelineArtifact@2
# displayName: 'Download WindowsAppSDK'
# inputs:
# buildType: 'specific'
# project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d'
# definition: '104083'
# allowPartiallySucceededBuilds: ${{ parameters.useUnstableWinAppSDK }}
# allowFailedBuilds: ${{ parameters.useUnstableWinAppSDK }}
# buildVersionToDownload: 'latestFromBranch'
# branchName: 'refs/heads/release/${{ parameters.versionNumber }}-stable'
# artifactName: 'WindowsAppSDK_Nuget_And_MSIX'
# targetPath: '$(Build.SourcesDirectory)\localpackages'
# - script: dir $(Build.SourcesDirectory)\localpackages\NugetPackages
# displayName: 'List downloaded packages'
- task: NuGetCommand@2
displayName: 'Install WindowsAppSDK'
inputs: