Skip to content

Commit

Permalink
Merge pull request #2 from neozhu/openaischeme
Browse files Browse the repository at this point in the history
Openaischeme
  • Loading branch information
neozhu authored Nov 17, 2024
2 parents 3789651 + f2dde54 commit 6d2c676
Show file tree
Hide file tree
Showing 25 changed files with 1,167 additions and 76 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch

- run: git tag ${{ steps.version.outputs.version }}
- run: git push origin ${{ steps.version.outputs.version }}

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

# - name: Restore dependencies
# run: dotnet restore CleanAspire.sln
# - name: Build
# run: dotnet build CleanAspire.sln --no-restore

- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish Docker image using .NET SDK
run: |
dotnet publish "src/CleanAspire.AppHost/CleanAspire.AppHost.csproj" -c Release /p:PublishProfile=DefaultContainer /p:ContainerRepository=${{ secrets.DOCKER_USERNAME }}/cleanaspire /p:ContainerTag=${{ steps.version.outputs.version }}
- name: Push Docker image to Docker Hub
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire:${{ steps.version.outputs.version }}
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore CleanAspire.slnx
run: dotnet restore CleanAspire.sln
- name: Build
run: dotnet build CleanAspire.slnx --no-restore
run: dotnet build CleanAspire.sln --no-restore
- name: Run tests
run: dotnet test ./tests/CleanAspire.Tests/CleanAspire.Tests.csproj --no-build --verbosity normal
106 changes: 106 additions & 0 deletions CleanAspire.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.13.35507.96
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{089100B1-113F-4E66-888A-E83F3999EAFD}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.Api", "src\CleanAspire.Api\CleanAspire.Api.csproj", "{DED5E19F-DB6B-C4EE-E692-CFFE0619C173}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.AppHost", "src\CleanAspire.AppHost\CleanAspire.AppHost.csproj", "{B92D7A82-8ECA-A291-3CB2-F3814065699C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.Application", "src\CleanAspire.Application\CleanAspire.Application.csproj", "{06710E4A-8503-48B5-B25B-D1056A7414EB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.ClientApp", "src\CleanAspire.ClientApp\CleanAspire.ClientApp.csproj", "{094B3FA8-466F-A58F-3DD9-8B1DF8A41758}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.Domain", "src\CleanAspire.Domain\CleanAspire.Domain.csproj", "{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.Infrastructure", "src\CleanAspire.Infrastructure\CleanAspire.Infrastructure.csproj", "{ABE1716E-889C-48B6-8AA0-51D688F3C480}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.ServiceDefaults", "src\CleanAspire.ServiceDefaults\CleanAspire.ServiceDefaults.csproj", "{0DFC6E30-9932-5041-9FC8-75D8303F5BEE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Migrators", "Migrators", "{C983071D-42D7-4326-A379-CE622E29D307}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrators.MSSQL", "src\Migrators\Migrators.MSSQL\Migrators.MSSQL.csproj", "{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrators.PostgreSQL", "src\Migrators\Migrators.PostgreSQL\Migrators.PostgreSQL.csproj", "{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrators.SQLite", "src\Migrators\Migrators.SQLite\Migrators.SQLite.csproj", "{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanAspire.Tests", "tests\CleanAspire.Tests\CleanAspire.Tests.csproj", "{184DD222-E87D-65E3-4E4F-ADC8680E2D81}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DED5E19F-DB6B-C4EE-E692-CFFE0619C173}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DED5E19F-DB6B-C4EE-E692-CFFE0619C173}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DED5E19F-DB6B-C4EE-E692-CFFE0619C173}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DED5E19F-DB6B-C4EE-E692-CFFE0619C173}.Release|Any CPU.Build.0 = Release|Any CPU
{B92D7A82-8ECA-A291-3CB2-F3814065699C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B92D7A82-8ECA-A291-3CB2-F3814065699C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B92D7A82-8ECA-A291-3CB2-F3814065699C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B92D7A82-8ECA-A291-3CB2-F3814065699C}.Release|Any CPU.Build.0 = Release|Any CPU
{06710E4A-8503-48B5-B25B-D1056A7414EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06710E4A-8503-48B5-B25B-D1056A7414EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06710E4A-8503-48B5-B25B-D1056A7414EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06710E4A-8503-48B5-B25B-D1056A7414EB}.Release|Any CPU.Build.0 = Release|Any CPU
{094B3FA8-466F-A58F-3DD9-8B1DF8A41758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{094B3FA8-466F-A58F-3DD9-8B1DF8A41758}.Debug|Any CPU.Build.0 = Debug|Any CPU
{094B3FA8-466F-A58F-3DD9-8B1DF8A41758}.Release|Any CPU.ActiveCfg = Release|Any CPU
{094B3FA8-466F-A58F-3DD9-8B1DF8A41758}.Release|Any CPU.Build.0 = Release|Any CPU
{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF}.Release|Any CPU.Build.0 = Release|Any CPU
{ABE1716E-889C-48B6-8AA0-51D688F3C480}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ABE1716E-889C-48B6-8AA0-51D688F3C480}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ABE1716E-889C-48B6-8AA0-51D688F3C480}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ABE1716E-889C-48B6-8AA0-51D688F3C480}.Release|Any CPU.Build.0 = Release|Any CPU
{0DFC6E30-9932-5041-9FC8-75D8303F5BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DFC6E30-9932-5041-9FC8-75D8303F5BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DFC6E30-9932-5041-9FC8-75D8303F5BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DFC6E30-9932-5041-9FC8-75D8303F5BEE}.Release|Any CPU.Build.0 = Release|Any CPU
{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317}.Release|Any CPU.Build.0 = Release|Any CPU
{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C}.Release|Any CPU.Build.0 = Release|Any CPU
{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1}.Release|Any CPU.Build.0 = Release|Any CPU
{184DD222-E87D-65E3-4E4F-ADC8680E2D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{184DD222-E87D-65E3-4E4F-ADC8680E2D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{184DD222-E87D-65E3-4E4F-ADC8680E2D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{184DD222-E87D-65E3-4E4F-ADC8680E2D81}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DED5E19F-DB6B-C4EE-E692-CFFE0619C173} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{B92D7A82-8ECA-A291-3CB2-F3814065699C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{06710E4A-8503-48B5-B25B-D1056A7414EB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{094B3FA8-466F-A58F-3DD9-8B1DF8A41758} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{DFAF6933-E1D7-4EAC-B854-FE12BC19D9EF} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{ABE1716E-889C-48B6-8AA0-51D688F3C480} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{0DFC6E30-9932-5041-9FC8-75D8303F5BEE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{C983071D-42D7-4326-A379-CE622E29D307} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{2E671CBD-FCC7-4BE8-B3AA-71C296AC5317} = {C983071D-42D7-4326-A379-CE622E29D307}
{7D6E47CC-90F1-4C19-AF96-1DE7EED7928C} = {C983071D-42D7-4326-A379-CE622E29D307}
{67226F2C-5D75-4B76-B5F8-E42A4BC1BBB1} = {C983071D-42D7-4326-A379-CE622E29D307}
{184DD222-E87D-65E3-4E4F-ADC8680E2D81} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
EndGlobalSection
EndGlobal
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## CleanAspire - Modern .NET 9 Minimal API + Blazor WebAssembly PWA Template
[![.NET](https://github.com/neozhu/cleanaspire/actions/workflows/dotnet.yml/badge.svg)](https://github.com/neozhu/cleanaspire/actions/workflows/dotnet.yml)
[![CodeQL](https://github.com/neozhu/cleanaspire/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/neozhu/cleanaspire/actions/workflows/github-code-scanning/codeql)

![blazorclient](https://github.com/user-attachments/assets/013b167b-59fa-42d7-a2f7-ffec301c4e11)
### Overview

Expand Down
54 changes: 30 additions & 24 deletions src/CleanAspire.Api/CleanAspire.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>CleanAspire.Api</RootNamespace>
<AssemblyName>CleanAspire.Api</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-rc.2.24474.1" />
<PackageReference Include="Scalar.AspNetCore" Version="1.2.37" />

</ItemGroup>



<ItemGroup>
<ProjectReference Include="..\CleanAspire.ServiceDefaults\CleanAspire.ServiceDefaults.csproj" />
<ProjectReference Include="..\Migrators\Migrators.MSSQL\Migrators.MSSQL.csproj" />
<ProjectReference Include="..\Migrators\Migrators.PostgreSQL\Migrators.PostgreSQL.csproj" />
<ProjectReference Include="..\Migrators\Migrators.SQLite\Migrators.SQLite.csproj" />

</ItemGroup>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>CleanAspire.Api</RootNamespace>
<AssemblyName>CleanAspire.Api</AssemblyName>

</PropertyGroup>
<PropertyGroup>
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="MailKit" Version="4.8.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-rc.2.24474.1" />
<PackageReference Include="Scalar.AspNetCore" Version="1.2.37" />

</ItemGroup>



<ItemGroup>
<ProjectReference Include="..\CleanAspire.ServiceDefaults\CleanAspire.ServiceDefaults.csproj" />
<ProjectReference Include="..\Migrators\Migrators.MSSQL\Migrators.MSSQL.csproj" />
<ProjectReference Include="..\Migrators\Migrators.PostgreSQL\Migrators.PostgreSQL.csproj" />
<ProjectReference Include="..\Migrators\Migrators.SQLite\Migrators.SQLite.csproj" />

</ItemGroup>

</Project>
Loading

0 comments on commit 6d2c676

Please sign in to comment.