Skip to content

Commit 180cf09

Browse files
committed
Use specific .NET version for NuGet operations
Introduces DOTNET_NUGET_VERSION environment variable to specify the .NET version for NuGet package operations, decoupling it from the SDK version in global.json. Updates setup-dotnet steps to use this version for package-related jobs.
1 parent 65ae6f4 commit 180cf09

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ env:
2121
IS_PR: ${{ startsWith(github.ref, 'refs/pull/') }}
2222
IS_RELEASE: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
2323

24+
# The version of .NET to use just for NuGet package operations.
25+
# This doesn't have to be exactly in sync with the .NET SDK
26+
# version defined in 'global.json', as it's not used for builds.
27+
DOTNET_NUGET_VERSION: ${{ '9.0.x' }}
28+
2429
jobs:
2530

2631
# Build the solution, run all tests, push packages to the PR feed.
@@ -105,7 +110,7 @@ jobs:
105110
- name: Install .NET SDK
106111
uses: actions/setup-dotnet@v5
107112
with:
108-
global-json-file: global.json
113+
dotnet-version: ${{ env.DOTNET_NUGET_VERSION }}
109114

110115
- name: Download packages list
111116
uses: actions/download-artifact@v5
@@ -165,7 +170,7 @@ jobs:
165170
- name: Install .NET SDK
166171
uses: actions/setup-dotnet@v5
167172
with:
168-
global-json-file: global.json
173+
dotnet-version: ${{ env.DOTNET_NUGET_VERSION }}
169174

170175
- name: Download signed packages for .NCT
171176
uses: actions/download-artifact@v5

0 commit comments

Comments
 (0)