Skip to content

Commit 0661347

Browse files
authored
Merge pull request #204 from NosCoreIO/claude/upgrade-dotnet-10-0124atqyn77dNTZErrxh1utB
Upgrade Project to .NET 10
2 parents fd3ab01 + cff6212 commit 0661347

3 files changed

Lines changed: 31 additions & 39 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,27 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v3
17+
uses: actions/setup-dotnet@v5
1818
with:
19-
dotnet-version: 8.0.x
19+
dotnet-version: '10.0.x'
2020

2121
- name: Check Tag
2222
id: check-tag
2323
run: |
2424
if [[ v${{ github.event.ref }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25-
echo ::set-output name=match::true
25+
echo "match=true" >> $GITHUB_OUTPUT
2626
fi
2727
28-
- name: Run Unit Tests
29-
run: |
30-
dotnet restore
31-
dotnet build
32-
dotnet test test/NosCore.Shared.Tests -v m
28+
- name: Restore dependencies
29+
run: dotnet restore
30+
31+
- name: Build
32+
run: dotnet build --no-restore --configuration Debug
33+
34+
- name: Test
35+
run: dotnet test test/NosCore.Shared.Tests --no-build --configuration Debug --verbosity normal
3336

3437
- name: Build Artifact
3538
if: steps.check-tag.outputs.match == 'true'
@@ -39,23 +42,13 @@ jobs:
3942
dotnet build -c Release
4043
dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
4144
dotnet nuget push /tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
42-
echo ::set-output name=ARTIFACT_PATH::/tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg
43-
echo ::set-output name=ARTIFACT_NAME::NosCore.Shared.${{github.event.ref}}.nupkg
44-
45-
- name: Gets Latest Release
46-
if: steps.check-tag.outputs.match == 'true'
47-
id: latest_release_info
48-
uses: jossef/action-latest-release-info@v1.1.0
49-
env:
50-
GITHUB_TOKEN: ${{ github.token }}
45+
echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
46+
echo "ARTIFACT_NAME=NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
5147
5248
- name: Upload Release Asset
5349
if: steps.check-tag.outputs.match == 'true'
54-
uses: actions/upload-release-asset@v1
55-
env:
56-
GITHUB_TOKEN: ${{ github.token }}
50+
uses: softprops/action-gh-release@v2
5751
with:
58-
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
59-
asset_path: ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
60-
asset_name: ${{ steps.build_artifact.outputs.ARTIFACT_NAME }}
61-
asset_content_type: application/zip
52+
files: ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/NosCore.Shared/NosCore.Shared.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;</TargetFrameworks>
4+
<TargetFrameworks>net10.0;</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<ApplicationIcon>favicon.ico</ApplicationIcon>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -20,22 +20,21 @@
2020
<Company>NosCore</Company>
2121
<PackageIcon>icon.png</PackageIcon>
2222
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
23+
<WarningsNotAsErrors>CS1591</WarningsNotAsErrors>
2324
<GenerateDocumentationFile>true</GenerateDocumentationFile>
24-
<NoWarn>CS1591</NoWarn>
2525
</PropertyGroup>
2626

2727
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
2828
<OutputPath>..\..\build\</OutputPath>
2929
</PropertyGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
32+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.10" />
3333
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
34-
<PackageReference Include="Serilog" Version="4.0.0" />
35-
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.1" />
36-
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
37-
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
38-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
34+
<PackageReference Include="Serilog" Version="4.3.0" />
35+
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
36+
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
37+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0" />
3938
</ItemGroup>
4039

4140
<ItemGroup>

test/NosCore.Shared.Tests/NosCore.Shared.Tests.csproj

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

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

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
13-
<PackageReference Include="Moq" Version="4.20.70" />
14-
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
15-
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.10" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
13+
<PackageReference Include="Moq" Version="4.20.72" />
14+
<PackageReference Include="MSTest.TestAdapter" Version="3.10.0" />
15+
<PackageReference Include="MSTest.TestFramework" Version="3.10.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)