Skip to content

Commit 719f4ef

Browse files
committed
chore: Upgrade to .NET 8
This commit: - Adds a global.json file to declare the required SDK version - Updates CI to install both .NET 6 and .NET 8 - Updates the test projects to test with both .NET 6 and .NET 8 Signed-off-by: Jon Skeet <[email protected]>
1 parent 295c124 commit 719f4ef

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ jobs:
1919
with:
2020
submodules: true
2121

22-
# Build with .NET 6.0 SDK
23-
- name: Setup .NET 6.0
22+
# Build with .NET 8.0 SDK
23+
# Test with .NET 6.0 and 8.0
24+
- name: Setup .NET 6.0 and 8.0
2425
uses: actions/setup-dotnet@v3
2526
with:
26-
dotnet-version: 6.0.x
27+
dotnet-version: |
28+
8.0.x
29+
6.0.x
2730
2831
- name: Build
2932
run: |

.github/workflows/nuget.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ jobs:
1717
with:
1818
submodules: true
1919

20-
# Build with .NET 6.0 SDK
21-
- name: Setup .NET 6.0
20+
# Build with .NET 8.0 SDK
21+
# Test with .NET 6.0 and 8.0
22+
- name: Setup .NET 6.0 and 8.0
2223
uses: actions/setup-dotnet@v3
2324
with:
24-
dotnet-version: 6.0.x
25+
dotnet-version: |
26+
8.0.x
27+
6.0.x
2528
2629
- name: Build
2730
run: |

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"allowPrerelease": false,
5+
"rollForward": "latestMinor"
6+
}
7+
}

test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

test/CloudNative.CloudEvents.UnitTests/CloudNative.CloudEvents.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)