Skip to content

Commit 720dd91

Browse files
authored
Upgrade to .NET 10 (#369)
* updated .net version * updated actions files * updated nuget packages * updated actions
1 parent dc09239 commit 720dd91

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
- name: Setup .NET
4040
uses: actions/setup-dotnet@v5
4141
with:
42-
dotnet-version: 8.0.x
42+
dotnet-version: 10.0.x
4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
45+
uses: github/codeql-action/init@v4
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
5353
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454
# If this step fails, then you should remove it and run the build manually (see below)
5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v3
56+
uses: github/codeql-action/autobuild@v4
5757

5858
# ℹ️ Command-line programs to run using the OS shell.
5959
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# make release
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v3
70+
uses: github/codeql-action/analyze@v4

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
with:
1414
fetch-depth: 0 #fetch-depth is needed for GitVersion
1515
- name: Install GitVersion #Install and calculate the new version with GitVersion
16-
uses: gittools/actions/gitversion/setup@v4.1.0
16+
uses: gittools/actions/gitversion/setup@v4.2.0
1717
with:
1818
versionSpec: 6.x
1919
- name: Determine Version
20-
uses: gittools/actions/gitversion/execute@v4.1.0
20+
uses: gittools/actions/gitversion/execute@v4.2.0
2121
id: gitversion # step id used as reference for output values
2222
- name: Display GitVersion outputs
2323
run: |
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup .NET
2727
uses: actions/setup-dotnet@v5
2828
with:
29-
dotnet-version: 8.0.x
29+
dotnet-version: 10.0.x
3030
- name: Run automated unit and integration tests
3131
run: dotnet test PipelinesToActions/PipelinesToActions.Tests/PipelinesToActions.Tests.csproj --configuration Debug -e:CollectCoverage=true -e:CoverletOutput=TestResults/ -e:CoverletOutputFormat=lcov
3232
- run: |
@@ -42,22 +42,22 @@ jobs:
4242
run: dotnet publish PipelinesToActions/PipelinesToActions/PipelinesToActionsWeb.csproj --configuration Release -p:Version='${{ steps.gitversion.outputs.MajorMinorPatch }}'
4343
#Publish build artifacts to GitHub
4444
- name: Upload website build artifacts back to GitHub
45-
uses: actions/upload-artifact@v4
45+
uses: actions/upload-artifact@v5
4646
with:
4747
name: webapp
48-
path: PipelinesToActions/PipelinesToActions/bin/Release/net8.0/publish
48+
path: PipelinesToActions/PipelinesToActions/bin/Release/net10.0/publish
4949

5050

5151
sonarCloud:
5252
name: Run SonarCloud analysis
5353
runs-on: ubuntu-latest
54-
if: github.ref == 'refs/heads/main'
54+
if: false && github.ref == 'refs/heads/main'
5555
steps:
5656
- name: Run Sonarcloud test
5757
uses: samsmithnz/SamsDotNetSonarCloudAction@v2.1
5858
with:
5959
projects: 'PipelinesToActions/PipelinesToActions/PipelinesToActionsWeb.csproj,PipelinesToActions/PipelinesToActions.Tests/PipelinesToActions.Tests.csproj'
60-
dotnet-version: '8.0.x'
60+
dotnet-version: '10.0.x'
6161
sonarcloud-organization: samsmithnz-github
6262
sonarcloud-project: samsmithnz_AzurePipelinesToGitHubActionsConverterWeb
6363
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -68,7 +68,7 @@ jobs:
6868
runs-on: windows-latest
6969
needs:
7070
- build
71-
- sonarCloud
71+
#- sonarCloud
7272
#Only deploy if running off the main branch - we don't want to deploy off feature branches
7373
if: github.ref == 'refs/heads/main'
7474
steps:
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
creds: ${{ secrets.AZURE_SP }}
8383
- name: Download webapp artifact #Download the artifacts from GitHub
84-
uses: actions/download-artifact@v5.0.0
84+
uses: actions/download-artifact@v5
8585
with:
8686
name: webapp
8787
path: webapp

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
next-version: 1.3.0
1+
next-version: 1.4.0

PipelinesToActions/PipelinesToActions.Tests/PipelinesToActions.Tests.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
11+
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
17-
<PackageReference Include="NSubstitute" Version="5.1.0" />
18-
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
19-
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
20-
<PackageReference Include="coverlet.collector" Version="6.0.0">
15+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
17+
<PackageReference Include="NSubstitute" Version="5.3.0" />
18+
<PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
19+
<PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
20+
<PackageReference Include="coverlet.collector" Version="6.0.4">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>

PipelinesToActions/PipelinesToActions/PipelinesToActionsWeb.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ApplicationInsightsResourceId>/subscriptions/65b8d298-e5bd-4735-912e-8b9c510c4e00/resourcegroups/PipelinesToActions/providers/microsoft.insights/components/PipelinesToActions-AppInsights</ApplicationInsightsResourceId>
66
<Version>1.0.0.0</Version>
77
<Deterministic>false</Deterministic>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="AzurePipelinesToGitHubActionsConverter.Core" Version="1.3.79" />
11+
<PackageReference Include="AzurePipelinesToGitHubActionsConverter.Core" Version="1.4.1" />
1212
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.23.0" />
1313
<PackageReference Include="Microsoft.ApplicationInsights.SnapshotCollector" Version="1.4.6" />
1414
</ItemGroup>

0 commit comments

Comments
 (0)