22
.github/workflows/pull_request_dev.yml
vendored
Normal file
22
.github/workflows/pull_request_dev.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Build NuGet package on dev branch pull request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "dev"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
22
.github/workflows/push_dev.yml
vendored
Normal file
22
.github/workflows/push_dev.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Build NuGet package on dev branch push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "dev"
|
||||
paths:
|
||||
- "TimetableDesigner.Backend.Events**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
4
.github/workflows/push_main.yml
vendored
4
.github/workflows/push_main.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Build NuGet package on main branch pull request
|
||||
name: Build NuGet package on main branch push
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace TimetableDesigner.Backend.Events;
|
||||
|
||||
public static class BuilderExtensions
|
||||
{
|
||||
public static IServiceCollection AddEventQueue<T>(this IServiceCollection services, Action<T> configuration) where T : EventQueue, new()
|
||||
{
|
||||
T builder = new T();
|
||||
configuration(builder);
|
||||
builder.Setup(services);
|
||||
return services;
|
||||
}
|
||||
|
||||
public static void AddEventHandler<T>(this WebApplication app, Func<T, Task> handler) where T : class
|
||||
{
|
||||
IEventQueueSubscriber subscriber = app.Services.GetService<IEventQueueSubscriber>()!;
|
||||
subscriber.Subscribe(handler);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,12 @@
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Title>TimetableDesigner.Backend.Events</Title>
|
||||
<Authors>Mateusz Skoczek</Authors>
|
||||
<PackageProjectUrl>https://github.com/TimetableDesigner/</PackageProjectUrl>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<RepositoryUrl>https://github.com/TimetableDesigner/TimetableDesigner.Backend.Events</RepositoryUrl>
|
||||
<Version />
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -12,9 +18,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore">
|
||||
<HintPath>C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\10.0.2\Microsoft.AspNetCore.dll</HintPath>
|
||||
</Reference>
|
||||
<None Update="icon.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
BIN
TimetableDesigner.Backend.Events/icon.png
Normal file
BIN
TimetableDesigner.Backend.Events/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user