Skip to content
Merged

Net8 #35

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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "weekly" # How often to check for updates (can be "daily", "weekly" or "monthly")
10 changes: 4 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This is a manually triggered dockerhub build and publish

name: Publish to Dockerhub
name: Build test and pack

on:
push:
Expand All @@ -20,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -29,7 +27,7 @@ jobs:
run: dotnet build -c Debug --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test -c Debug --no-build --verbosity normal

- name: Pack
run: dotnet pack --no-build --verbosity normal
run: dotnet pack -c Debug --no-build --verbosity normal
10 changes: 5 additions & 5 deletions .github/workflows/dockerhub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -48,11 +48,11 @@ jobs:
- name: Docker Hub Log in
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push image to Dockerhub
run: |
docker build -f webapi.dockerfile -t genocs/demo-webapi:${{github.event.inputs.version}} -t genocs/demo-webapi:latest .
docker push genocs/demo-webapi:${{github.event.inputs.version}}
docker build -f webapi.dockerfile -t genocs/demo-webapi:${{ github.event.inputs.version }} -t genocs/demo-webapi:latest .
docker push genocs/demo-webapi:${{ github.event.inputs.version }}
docker push genocs/demo-webapi:latest
8 changes: 4 additions & 4 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
# Runs a single command using the runners shell
- name: Send greeting
run: echo "Hello ${{github.event.inputs.name}}"
run: echo "Hello ${{ github.event.inputs.name }}"

- name: Print Run Number
run: echo "Hello $env:GITHUB_RUN_NUMBER"
Expand All @@ -38,10 +38,10 @@ jobs:
run: echo "Hello $env:GITHUB_RUN_ATTEMPT"

- name: Output Run ID
run: echo ${{github.run_id}}
run: echo ${{ github.run_id }}

- name: Output Run Number
run: echo ${{github.run_number}}
run: echo ${{ github.run_number }}

- name: Output Run Attempt
run: echo ${{github.run_attempt}}
run: echo ${{ github.run_attempt }}
8 changes: 4 additions & 4 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
description: "Packages Version"

# Default value if no value is explicitly provided
default: "5.0.0-preview.5.0"
default: "5.0.0"

# Input has to be provided for the workflow to run
required: true
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
Expand All @@ -43,7 +43,7 @@ jobs:
run: dotnet test --no-build --verbosity normal

- name: Pack
run: dotnet pack -c Debug -o out -p:PackageVersion=${{github.event.inputs.version}} --no-build --verbosity normal
run: dotnet pack -c Debug -o out -p:PackageVersion=${{ github.event.inputs.version }} --no-build --verbosity normal

- name: Push packages to Nuget
run: dotnet nuget push ./out/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
run: dotnet nuget push ./out/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
17 changes: 10 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
<Project>

<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)dotnet.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoDefaultExcludes>true</NoDefaultExcludes>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)dotnet.ruleset</CodeAnalysisRuleSet>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<NoDefaultExcludes>true</NoDefaultExcludes>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Roslynator.Analyzers" Version="4.5.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.6.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">

<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="Properties\stylecop.json" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory).editorconfig" Link="Properties\.editorconfig" />
</ItemGroup>
Expand Down
6 changes: 2 additions & 4 deletions demo-webapi.dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

#FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

#FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /src
COPY ["src/Genocs.Core", "src/Genocs.Core/"]
COPY ["src/Genocs.Common", "src/Genocs.Common/"]
Expand Down
6 changes: 2 additions & 4 deletions demo-worker.dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

#FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

#FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /src
COPY ["src/Genocs.Core.Demo.Worker", "src/Genocs.Core.Demo.Worker/"]
COPY ["src/Genocs.Core.Demo.Contracts", "src/Genocs.Core.Demo.Contracts/"]
Expand Down
126 changes: 62 additions & 64 deletions src/Genocs.Auth/Genocs.Auth.csproj
Original file line number Diff line number Diff line change
@@ -1,74 +1,72 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Genocs.Auth</PackageId>
<LangVersion>10.0</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>5.0.0-preview.5.0</Version>
<MinClientVersion>5.0.0</MinClientVersion>
<Authors>Nocco Giovanni Emanuele</Authors>
<Company>Genocs</Company>
<Title>The authorization library useful to build .NET Core projects.</Title>
<Description>The authorization library useful to build .NET Core projects.</Description>
<Copyright>Genocs 2023</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/Genocs/genocs-library</PackageProjectUrl>
<RepositoryUrl>https://github.com/Genocs/genocs-library.git</RepositoryUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<PackageTags>aggregate architecture boilerplate ddd ddd-architecture design-patterns domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>Aligned to the ecosystem</PackageReleaseNotes>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<PackageId>Genocs.Auth</PackageId>
<RootNamespace>Genocs.Auth</RootNamespace>
<AssemblyName>Genocs.Auth</AssemblyName>
<LangVersion>10.0</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>5.0.0</Version>
<MinClientVersion>5.0.0</MinClientVersion>
<Authors>Nocco Giovanni Emanuele</Authors>
<Company>Genocs</Company>
<Title>The authorization library useful to build .NET Core projects.</Title>
<Description>The authorization library useful to build .NET Core projects.</Description>
<Copyright>Genocs 2023</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/Genocs/genocs-library</PackageProjectUrl>
<RepositoryUrl>https://github.com/Genocs/genocs-library.git</RepositoryUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<PackageTags>aggregate architecture boilerplate ddd ddd-architecture design-patterns domain-driven-design dotnet dotnetcore dotnet-core microservice microservices solid solid-principles</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>Aligned to the ecosystem</PackageReleaseNotes>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\Genocs.Core\Genocs.Core.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\Genocs.Core\Genocs.Core.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="Genocs.Core" Version="5.0.0-preview.5.*" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="Genocs.Core" Version="5.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.27.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.6.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
</ItemGroup>

</Project>
7 changes: 2 additions & 5 deletions src/Genocs.Auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ Following are the project settings needed to enable monitoring

## Release notes

### [2023-10-13] 5.0.0-preview.5.0
- Added [editorconfig](https://editorconfig.org/)
- Added StyleCop
- Updated logo
- Updated readme
### [2023-11-25] 5.0.0
- Moved to NET8

### [2023-10-13] 5.0.0-preview.5.0
- Added [editorconfig](https://editorconfig.org/)
Expand Down
Loading