Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.0.0 #31

Merged
merged 3 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/Manual_Nuget_Push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_Manual_Nuget_Push --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: Manual_Nuget_Push

on: [workflow_dispatch]

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: NugetPush'
run: ./build.cmd NugetPush
env:
NugetApiKey: ${{ secrets.NUGET_API_KEY }}
48 changes: 33 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
name: .NET Core Build
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_Build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: Build

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master

jobs:
build:

ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- uses: actions/checkout@v3
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Compile'
run: ./build.cmd Compile
111 changes: 111 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"properties": {
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NugetApiKey": {
"type": "string",
"description": "Nuget Api Key",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"NugetPack",
"NugetPush",
"Restore"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"NugetPack",
"NugetPush",
"Restore"
]
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
}
}
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "Discord.Addons.Hosting.sln"
}
4 changes: 4 additions & 0 deletions Discord.Addons.Hosting.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Simple", "Samples\Sa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ShardedClient", "Samples\Sample.ShardedClient\Sample.ShardedClient.csproj", "{540A37B5-E304-49A4-B68E-08941C0D33F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{5F0002A4-BACE-4097-A1B6-4350CEB9283F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5F0002A4-BACE-4097-A1B6-4350CEB9283F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F0002A4-BACE-4097-A1B6-4350CEB9283F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
20 changes: 14 additions & 6 deletions Discord.Addons.Hosting/Discord.Addons.Hosting.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<PackageId>Discord.Addons.Hosting</PackageId>
<Version>5.2.0</Version>
<Version>6.0.0</Version>
<Authors>Hawxy</Authors>
<Description>Simplifying Discord.Net hosting with .NET Generic Host (Microsoft.Extensions.Hosting)</Description>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand All @@ -12,7 +12,7 @@
<RepositoryUrl>https://github.com/Hawxy/Discord.Addons.Hosting</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>icon.png</PackageIcon>
<Copyright>Hawxy 2018-2023</Copyright>
<Copyright>Hawxy 2018-2024</Copyright>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>discord,discord.net,addon,hosting,microsoft.extensions.hosting</PackageTags>
<Nullable>Enable</Nullable>
Expand All @@ -21,9 +21,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Discord.Net.Commands" Version="3.8.1" />
<PackageReference Include="Discord.Net.Interactions" Version="3.8.1" />
<PackageReference Include="Discord.Net.WebSocket" Version="3.8.1" />
<PackageReference Include="Discord.Net.Commands" Version="3.12.0" />
<PackageReference Include="Discord.Net.Interactions" Version="3.12.0" />
<PackageReference Include="Discord.Net.WebSocket" Version="3.12.0" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Discord.Addons.Hosting/DiscordClientService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region License

/*
Copyright 2019-2022 Hawxy
Copyright 2019-2024 Hawxy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading
Loading