99 # Enforces the consistency of code formatting using `.editorconfig` and the `dotnet-format` tool.
1010 check-format :
1111 if : github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
12- runs-on : ubuntu-20 .04
12+ runs-on : ubuntu-22 .04
1313 steps :
1414 - name : Checkout
15- uses : actions/checkout@v2
15+ uses : actions/checkout@v4
1616 - name : Setup .NET Core SDK
17- uses : actions/setup-dotnet@v1
17+ uses : actions/setup-dotnet@v4
1818 with :
19- dotnet-version : 5 .0.201
19+ dotnet-version : 8 .0.404
2020 - name : Pin .NET Core SDK
21- run : dotnet new globaljson --sdk-version 5 .0.201
21+ run : dotnet new globaljson --sdk-version 8 .0.404
2222 - name : Restore tools
2323 run : dotnet tool restore
2424 - name : Check format
25- run : dotnet format --check --folder T4.Build
25+ run : dotnet format whitespace T4.Build/T4.Build.csproj --verify-no-changes
2626
2727 build :
2828 if : github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
29- runs-on : ubuntu-20 .04
29+ runs-on : ubuntu-22 .04
3030 steps :
3131 - name : Checkout
32- uses : actions/checkout@v2
32+ uses : actions/checkout@v4
3333 with :
3434 submodules : true
3535 fetch-depth : 0
3636 - name : Setup .NET Core SDK
37- uses : actions/setup-dotnet@v1
37+ uses : actions/setup-dotnet@v4
3838 with :
39- dotnet-version : 5 .0.201
39+ dotnet-version : 8 .0.404
4040 - name : Pin .NET Core SDK
41- run : dotnet new globaljson --sdk-version 5 .0.201
41+ run : dotnet new globaljson --sdk-version 8 .0.404
4242 - name : Create package
4343 shell : pwsh
4444 run : |
@@ -55,18 +55,18 @@ jobs:
5555 }
5656 dotnet pack --configuration=Release @params
5757 - name : Upload NuGet package artifact
58- uses : actions/upload-artifact@v2
58+ uses : actions/upload-artifact@v4
5959 with :
6060 name : nuget-package
6161 path : T4.Build/bin/Release/T4.Build.*.nupkg
6262
6363 publish :
6464 if : startsWith(github.ref, 'refs/tags/v')
6565 needs : [check-format, build]
66- runs-on : ubuntu-20 .04
66+ runs-on : ubuntu-22 .04
6767 steps :
6868 - name : Download NuGet package artifact
69- uses : actions/download-artifact@v2
69+ uses : actions/download-artifact@v4
7070 with :
7171 name : nuget-package
7272 - name : Publish to NuGet
0 commit comments