Skip to content

Commit a1c9fd9

Browse files
authored
Merge branch 'alpha' into command_docs
2 parents 7c6f2df + 057887a commit a1c9fd9

279 files changed

Lines changed: 3062 additions & 1476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-publish.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@ name: Build and Publish
22

33
on:
44
push:
5-
branches:
6-
- stable
7-
- alpha
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
- '[0-9]+.[0-9]+.[0-9]+-*'
88

99
jobs:
1010
build-and-publish:
1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
filter: tree:0
1518

1619
- name: Setup .NET
1720
uses: actions/setup-dotnet@v4
1821
with:
19-
dotnet-version: 8.0.x
22+
global-json-file: global.json
2023

2124
- name: Restore dependencies
2225
run: dotnet restore
@@ -49,11 +52,11 @@ jobs:
4952
env:
5053
KEY: ${{ secrets.NUGET_API_KEY }}
5154
run: |
52-
dotnet nuget push NetCord/bin/Release/*.nupkg -k $KEY -n -s https://api.nuget.org/v3/index.json --skip-duplicate
53-
dotnet nuget push NetCord.Services/bin/Release/*.nupkg -k $KEY -n -s https://api.nuget.org/v3/index.json --skip-duplicate
54-
dotnet nuget push Hosting/NetCord.Hosting/bin/Release/*.nupkg -k $KEY -n -s https://api.nuget.org/v3/index.json --skip-duplicate
55-
dotnet nuget push Hosting/NetCord.Hosting.Services/bin/Release/*.nupkg -k $KEY -n -s https://api.nuget.org/v3/index.json --skip-duplicate
56-
dotnet nuget push Hosting/NetCord.Hosting.AspNetCore/bin/Release/*.nupkg -k $KEY -n -s https://api.nuget.org/v3/index.json --skip-duplicate
55+
dotnet nuget push NetCord/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
56+
dotnet nuget push NetCord.Services/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
57+
dotnet nuget push Hosting/NetCord.Hosting/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
58+
dotnet nuget push Hosting/NetCord.Hosting.Services/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
59+
dotnet nuget push Hosting/NetCord.Hosting.AspNetCore/bin/Release/*.nupkg -k $KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
5760
5861
- name: Deploy Documentation
5962
uses: appleboy/scp-action@v0.1.7

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches:
66
- stable
77
- alpha
8+
push:
9+
branches:
10+
- stable
11+
- alpha
12+
tags-ignore:
13+
- '[0-9]+.[0-9]+.[0-9]+'
14+
- '[0-9]+.[0-9]+.[0-9]+-*'
815

916
concurrency:
1017
group: ${{ github.ref_name }}
@@ -15,11 +22,14 @@ jobs:
1522

1623
steps:
1724
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
filter: tree:0
1828

1929
- name: Setup .NET
2030
uses: actions/setup-dotnet@v4
2131
with:
22-
dotnet-version: 8.0.x
32+
global-json-file: global.json
2333

2434
- name: Restore dependencies
2535
run: dotnet restore

.github/workflows/documentation-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ concurrency:
1010

1111
jobs:
1212
documentation-preview:
13+
if: ${{ github.event.workflow_run.event == 'pull_request' }}
1314
runs-on: ubuntu-latest
1415

1516
permissions:

Directory.Build.props

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<LangVersion>latest</LangVersion>
8+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
9+
<IsAotCompatible>true</IsAotCompatible>
10+
<NoWarn>1591</NoWarn>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
15+
<PackageProjectUrl>https://netcord.dev</PackageProjectUrl>
16+
<PackageTags>bot;discord;discord-api</PackageTags>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<Description>The modern and fully customizable C# Discord library.</Description>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
20+
<PackageIcon>ICON.png</PackageIcon>
21+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
22+
</PropertyGroup>
23+
24+
<PropertyGroup>
25+
<IncludeSymbols>true</IncludeSymbols>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
27+
</PropertyGroup>
28+
29+
<PropertyGroup Condition="'$(CI)' != ''">
30+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
31+
</PropertyGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<None Include="$(MSBuildThisFileDirectory)\Resources\NuGet\README.md" Pack="true" PackagePath="" />
39+
<None Include="$(MSBuildThisFileDirectory)\Resources\NuGet\ICON.png" Pack="true" PackagePath="" />
40+
</ItemGroup>
41+
42+
</Project>

Directory.Build.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<DefineConstants>$(DefineConstants);$([System.String]::Copy('$(AssemblyName)').Replace('.', '_'))</DefineConstants>
5+
</PropertyGroup>
6+
7+
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<LangVersion>latest</LangVersion>
7+
<Nullable>enable</Nullable>
8+
<AssemblyName>MyBot</AssemblyName>
9+
<RootNamespace>MyBot</RootNamespace>
10+
</PropertyGroup>
11+
12+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<Project>
2+
</Project>

Documentation/guides/basic-concepts/HttpInteractions/HttpInteractions.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<LangVersion>latest</LangVersion>
8-
<Nullable>enable</Nullable>
9-
<AssemblyName>MyBot</AssemblyName>
10-
<RootNamespace>MyBot</RootNamespace>
115
</PropertyGroup>
126

137
<ItemGroup>

Documentation/guides/basic-concepts/RespondingToInteractions/RespondingToInteractions.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<LangVersion>latest</LangVersion>
8-
<Nullable>enable</Nullable>
9-
<AssemblyName>MyBot</AssemblyName>
10-
<RootNamespace>MyBot</RootNamespace>
115
</PropertyGroup>
126

137
<ItemGroup>

Documentation/guides/basic-concepts/SendingMessages/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ async static Task PropertiesAsync()
154154

155155
message.AddAttachments(attachment);
156156

157-
ComponentProperties component;
157+
IComponentProperties component;
158158

159159
component = new ActionRowProperties
160160
{

0 commit comments

Comments
 (0)