From 5b5ce0bfb0183bc26a1aab58f61fc8785cdab440 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Mon, 24 Jun 2024 13:36:13 +0800 Subject: [PATCH] Add UsePython Task in Nuget Publish workflow (#21144) ### Description Otherwise it would fail in https://github.com/microsoft/onnxruntime/blob/b95982e588e2d433958aa9aa82557b714ec4e3de/tools/ci_build/github/azure-pipelines/publish-nuget.yml#L78-L81 ### Motivation and Context The Windows CPU image is migrated to managed image ### Verification Link https://dev.azure.com/aiinfra/Lotus/_build?definitionId=1313 --- tools/ci_build/github/azure-pipelines/publish-nuget.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/publish-nuget.yml b/tools/ci_build/github/azure-pipelines/publish-nuget.yml index 8ce7915da7..367977ff59 100644 --- a/tools/ci_build/github/azure-pipelines/publish-nuget.yml +++ b/tools/ci_build/github/azure-pipelines/publish-nuget.yml @@ -29,6 +29,12 @@ stages: - checkout: self submodules: false + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.9' + addToPath: true + - template: templates/set-version-number-variables-step.yml - script: mkdir "$(Build.BinariesDirectory)\nuget-artifact\final-package"