Add net10.0 build target, update deps (#3200)

This commit is contained in:
Mihail Gribkov
2025-11-11 22:34:40 +03:00
committed by GitHub
parent 0aff637ecf
commit f205bba17f
19 changed files with 50 additions and 42 deletions

View File

@@ -19,21 +19,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 9.0.x dotnet-version: 10.0.x
- name: Setup DocFX - name: Setup DocFX
run: dotnet tool install -g docfx --version 2.78.3 run: dotnet tool install -g docfx --version 2.78.4
- name: Build DNet docs - name: Build DNet docs
run: docfx docs/docfx.json run: docfx docs/docfx.json
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v5
with: with:
name: static-docs name: static-docs
path: docs/_site path: docs/_site
@@ -45,7 +45,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
steps: steps:
- name: Download Artifacts - name: Download Artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v6
with: with:
name: static-docs name: static-docs
path: output/ path: output/

View File

@@ -20,12 +20,12 @@ jobs:
IsTagBuild: false IsTagBuild: false
DOTNET_INSTALL_DIR: "/usr/share/dotnet" DOTNET_INSTALL_DIR: "/usr/share/dotnet"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 9.0.x dotnet-version: 10.0.x
- name: Is Tag Build - name: Is Tag Build
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
@@ -69,7 +69,7 @@ jobs:
# dotnet pack "experiment\Discord.Net.BuildOverrides\Discord.Net.BuildOverrides.csproj" --no-restore --no-build -v minimal -c Release -o ${{ env.ArtifactStagingDirectory }} /p:BuildNumber=${{ env.Suffix }} /p:IsTagBuild=${{ env.IsTagBuild }} # dotnet pack "experiment\Discord.Net.BuildOverrides\Discord.Net.BuildOverrides.csproj" --no-restore --no-build -v minimal -c Release -o ${{ env.ArtifactStagingDirectory }} /p:BuildNumber=${{ env.Suffix }} /p:IsTagBuild=${{ env.IsTagBuild }}
- name: Publish Artifacts - name: Publish Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v5
with: with:
name: discord-net name: discord-net
path: ${{ env.ArtifactStagingDirectory }}/* path: ${{ env.ArtifactStagingDirectory }}/*
@@ -84,7 +84,7 @@ jobs:
ArtifactStagingDirectory: "artifacts" ArtifactStagingDirectory: "artifacts"
REPOSITORY_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json REPOSITORY_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Is Tag Build - name: Is Tag Build
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
@@ -106,7 +106,7 @@ jobs:
nuget-version: '6.x' nuget-version: '6.x'
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v6
with: with:
name: discord-net name: discord-net
path: ${{ env.ArtifactStagingDirectory }} path: ${{ env.ArtifactStagingDirectory }}

View File

@@ -4,7 +4,7 @@ The documentation for the Discord.Net library uses [DocFX][docfx-main].
Instructions for installing this tool can be found [here][docfx-installing]. Instructions for installing this tool can be found [here][docfx-installing].
> [!IMPORTANT] > [!IMPORTANT]
> You must use DocFX version **2.78.3** for everything to work correctly. > You must use DocFX version **2.78.4** for everything to work correctly.
1. Navigate to the root of the repository. 1. Navigate to the root of the repository.
2. Build the docs using `docfx docs/docfx.json`. Add the `--serve` 2. Build the docs using `docfx docs/docfx.json`. Add the `--serve`

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.BuildOverrides</AssemblyName> <AssemblyName>Discord.Net.BuildOverrides</AssemblyName>
<RootNamespace>Discord.BuildOverrides</RootNamespace> <RootNamespace>Discord.BuildOverrides</RootNamespace>
<Description>A Discord.Net extension adding a way to add build overrides for testing.</Description> <Description>A Discord.Net extension adding a way to add build overrides for testing.</Description>
<TargetFrameworks>net8.0;net9.0;</TargetFrameworks> <TargetFrameworks>net8.0;net9.0;net10.0;</TargetFrameworks>
<IsTrimmable>false</IsTrimmable> <IsTrimmable>false</IsTrimmable>
<IsAotCompatible>false</IsAotCompatible> <IsAotCompatible>false</IsAotCompatible>
<IncludeSymbols>true</IncludeSymbols> <IncludeSymbols>true</IncludeSymbols>

View File

@@ -6,7 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Discord.Net.WebSocket" Version="3.17.0" /> <PackageReference Include="Discord.Net.WebSocket" Version="3.18.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -8,13 +8,13 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Discord.Net.WebSocket" Version="3.17.0" /> <PackageReference Include="Discord.Net.WebSocket" Version="3.18.0" />
<PackageReference Include="Discord.Net.Interactions" Version="3.17.0" /> <PackageReference Include="Discord.Net.Interactions" Version="3.18.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -7,8 +7,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Discord.Net" Version="3.17.0" /> <PackageReference Include="Discord.Net" Version="3.18.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -7,9 +7,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Discord.Net.Commands" Version="3.17.0" /> <PackageReference Include="Discord.Net.Commands" Version="3.18.0" />
<PackageReference Include="Discord.Net.Websocket" Version="3.17.0" /> <PackageReference Include="Discord.Net.Websocket" Version="3.18.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Discord.Net.Webhook" Version="3.17.0" /> <PackageReference Include="Discord.Net.Webhook" Version="3.18.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -6,7 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.14.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.Commands</AssemblyName> <AssemblyName>Discord.Net.Commands</AssemblyName>
<RootNamespace>Discord.Commands</RootNamespace> <RootNamespace>Discord.Commands</RootNamespace>
<Description>A Discord.Net extension adding support for bot commands.</Description> <Description>A Discord.Net extension adding support for bot commands.</Description>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<WarningLevel>5</WarningLevel> <WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> <TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<IsTrimmable>false</IsTrimmable> <IsTrimmable>false</IsTrimmable>
@@ -17,6 +17,6 @@
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" /> <ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.Core</AssemblyName> <AssemblyName>Discord.Net.Core</AssemblyName>
<RootNamespace>Discord</RootNamespace> <RootNamespace>Discord</RootNamespace>
<Description>The core components for the Discord.Net library.</Description> <Description>The core components for the Discord.Net library.</Description>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<WarningLevel>5</WarningLevel> <WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> <TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<IsTrimmable>false</IsTrimmable> <IsTrimmable>false</IsTrimmable>
@@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-rc.1.25451.107" /> <PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0" />
<PackageReference Include="IDisposableAnalyzers" Version="4.0.8"> <PackageReference Include="IDisposableAnalyzers" Version="4.0.8">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>

View File

@@ -2,7 +2,7 @@
<Import Project="../../Discord.Net.targets" /> <Import Project="../../Discord.Net.targets" />
<Import Project="../../StyleAnalyzer.targets" /> <Import Project="../../StyleAnalyzer.targets" />
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<RootNamespace>Discord.Interactions</RootNamespace> <RootNamespace>Discord.Interactions</RootNamespace>
<AssemblyName>Discord.Net.Interactions</AssemblyName> <AssemblyName>Discord.Net.Interactions</AssemblyName>
<Description>A Discord.Net extension adding support for Application Commands.</Description> <Description>A Discord.Net extension adding support for Application Commands.</Description>
@@ -20,7 +20,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.Rest</AssemblyName> <AssemblyName>Discord.Net.Rest</AssemblyName>
<RootNamespace>Discord.Rest</RootNamespace> <RootNamespace>Discord.Rest</RootNamespace>
<Description>A core Discord.Net library containing the REST client and models.</Description> <Description>A core Discord.Net library containing the REST client and models.</Description>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<WarningLevel>5</WarningLevel> <WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> <TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<IsTrimmable>false</IsTrimmable> <IsTrimmable>false</IsTrimmable>

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.WebSocket</AssemblyName> <AssemblyName>Discord.Net.WebSocket</AssemblyName>
<RootNamespace>Discord.WebSocket</RootNamespace> <RootNamespace>Discord.WebSocket</RootNamespace>
<Description>A core Discord.Net library containing the WebSocket client and models.</Description> <Description>A core Discord.Net library containing the WebSocket client and models.</Description>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningLevel>5</WarningLevel> <WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> <TreatWarningsAsErrors>True</TreatWarningsAsErrors>

View File

@@ -5,7 +5,7 @@
<AssemblyName>Discord.Net.Webhook</AssemblyName> <AssemblyName>Discord.Net.Webhook</AssemblyName>
<RootNamespace>Discord.Webhook</RootNamespace> <RootNamespace>Discord.Webhook</RootNamespace>
<Description>A core Discord.Net library containing the Webhook client and models.</Description> <Description>A core Discord.Net library containing the Webhook client and models.</Description>
<TargetFrameworks>net9.0;net8.0;</TargetFrameworks> <TargetFrameworks>net10.0;net9.0;net8.0;</TargetFrameworks>
<WarningLevel>5</WarningLevel> <WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> <TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<IsTrimmable>false</IsTrimmable> <IsTrimmable>false</IsTrimmable>

View File

@@ -14,6 +14,14 @@
<icon>PackageLogo.png</icon> <icon>PackageLogo.png</icon>
<readme>NUGET_README.md</readme> <readme>NUGET_README.md</readme>
<dependencies> <dependencies>
<group targetFramework="net10.0">
<dependency id="Discord.Net.Core" version="3.18.0$suffix$" />
<dependency id="Discord.Net.Rest" version="3.18.0$suffix$" />
<dependency id="Discord.Net.WebSocket" version="3.18.0$suffix$" />
<dependency id="Discord.Net.Commands" version="3.18.0$suffix$" />
<dependency id="Discord.Net.Webhook" version="3.18.0$suffix$" />
<dependency id="Discord.Net.Interactions" version="3.18.0$suffix$" />
</group>
<group targetFramework="net9.0"> <group targetFramework="net9.0">
<dependency id="Discord.Net.Core" version="3.18.0$suffix$" /> <dependency id="Discord.Net.Core" version="3.18.0$suffix$" />
<dependency id="Discord.Net.Rest" version="3.18.0$suffix$" /> <dependency id="Discord.Net.Rest" version="3.18.0$suffix$" />

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
@@ -14,7 +14,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Shouldly" Version="4.3.0" /> <PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5"> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
@@ -12,7 +12,7 @@
<ProjectReference Include="../../src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj" /> <ProjectReference Include="../../src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" /> <PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5"> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">