2323 name : build-${{ matrix.os }}
2424 runs-on : ${{ matrix.os }}
2525
26+ outputs :
27+ dotnet-sdk-version : ${{ steps.setup-dotnet.outputs.dotnet-version }}
28+
2629 permissions :
2730 attestations : write
2831 contents : read
4851 - name : Checkout code
4952 uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5053
54+ - name : Setup .NET SDK
55+ uses : actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
56+ id : setup-dotnet
57+
5158 # Arcade only allows the revision to contain up to two characters, and GitHub Actions does not roll-over
5259 # build numbers every day like Azure DevOps does. To balance these two requirements, set the official
5360 # build ID to be the same format as the built-in default from Arcade, except with the revision number
@@ -115,18 +122,14 @@ jobs:
115122 name : packages-windows
116123
117124 - name : Setup .NET
118- uses : actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
119-
120- # Note: the dotnet-validate tool requires .NET 6.0, which is no longer installed by default.
121- - name : Setup .NET
122- uses : actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
125+ uses : actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
123126 with :
124- dotnet-version : ' 6.0.x '
127+ dotnet-version : ${{ needs.build.outputs.dotnet-sdk-version }}
125128
126129 - name : Validate NuGet packages
127130 shell : pwsh
128131 run : |
129- dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
132+ dotnet tool install --global dotnet-validate --version 0.0.1-preview.304 --allow-roll-forward
130133 $packages = Get-ChildItem -Filter "*.nupkg" | ForEach-Object { $_.FullName }
131134 $invalidPackages = 0
132135 foreach ($package in $packages) {
@@ -155,7 +158,9 @@ jobs:
155158 name : packages-windows
156159
157160 - name : Setup .NET
158- uses : actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
161+ uses : actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
162+ with :
163+ dotnet-version : ${{ needs.build.outputs.dotnet-sdk-version }}
159164
160165 - name : Push packages to MyGet.org
161166 env :
@@ -175,7 +180,9 @@ jobs:
175180 name : packages-windows
176181
177182 - name : Setup .NET
178- uses : actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
183+ uses : actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
184+ with :
185+ dotnet-version : ${{ needs.build.outputs.dotnet-sdk-version }}
179186
180187 - name : Push packages to NuGet.org
181188 env :
0 commit comments