Skip to content

Commit

Permalink
feat: Update solution to .NET 8.0 + CI
Browse files Browse the repository at this point in the history
feat: Update solution to .NET 8.0

- Updated the target framework of multiple projects to .NET 8.0
- Updated package references to versions compatible with .NET 8.0
- Modified GitHub Actions workflow to use .NET 8.0 for building and testing
  • Loading branch information
SakuraIsayeki committed Sep 17, 2023
1 parent d68fe27 commit 07178c3
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 60 deletions.
54 changes: 19 additions & 35 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,26 @@ name: .NET Build
on:
- push
- pull_request

jobs:
build-debug:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: 'recursive'

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Debug
- name: Test
run: dotnet test --no-build --verbosity normal
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: 'recursive'

build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: 'recursive'

- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
allow-prerelease: true
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c ${{ matrix.configuration }}
- name: Test
run: dotnet test --no-build --verbosity normal
6 changes: 3 additions & 3 deletions src/YumeChan.ConsoleRunner/YumeChan.ConsoleRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Version>3.0</Version>
<Authors>Sakura Akeno Isayeki</Authors>
Expand All @@ -24,8 +24,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

Expand Down
18 changes: 9 additions & 9 deletions src/YumeChan.Core/YumeChan.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Version>3.0-rc3</Version>
<Authors>Sakura Akeno Isayeki</Authors>
<Company>Nodsoft Systems</Company>
Expand Down Expand Up @@ -32,14 +32,14 @@
<PackageReference Include="DSharpPlus.Interactivity" Version="4.4.*" />
<PackageReference Include="DSharpPlus.Lavalink" Version="4.4.*" />
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.4.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="NuGet.Configuration" Version="6.5.0" />
<PackageReference Include="NuGet.Resolver" Version="6.5.0" />
<PackageReference Include="System.Text.Json" Version="6.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="NuGet.Configuration" Version="6.7.0" />
<PackageReference Include="NuGet.Resolver" Version="6.7.0" />
<PackageReference Include="System.Text.Json" Version="8.0.0-rc.1.23419.4" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/YumeChan.NetRunner.Plugins/YumeChan.NetRunner.Plugins.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -21,10 +21,10 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Nodsoft.MoltenObsidian.Blazor" Version="0.5.13" />
<PackageReference Include="Nodsoft.MoltenObsidian.Vaults.FileSystem" Version="0.5.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.0-rc.1.23421.29" />
<PackageReference Include="Nodsoft.MoltenObsidian.Blazor" Version="0.5.18" />
<PackageReference Include="Nodsoft.MoltenObsidian.Vaults.FileSystem" Version="0.5.18" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions src/YumeChan.NetRunner/YumeChan.NetRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Version>3.0-rc3</Version>
<Authors>Sakura Akeno Isayeki</Authors>
<Company>Nodsoft Systems</Company>
Expand All @@ -24,23 +24,23 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNet.Security.OAuth.Discord" Version="6.0.11" />
<PackageReference Include="AspNet.Security.OAuth.Discord" Version="7.0.4" />
<PackageReference Include="DartSassBuilder" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.1.5">
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.2.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0-rc.1.23419.4" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 07178c3

Please sign in to comment.