Skip to content

Commit

Permalink
update .NET 5
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobritodev committed May 12, 2021
1 parent 51ea2cc commit 8c54984
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 23 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Master - Publish packages

on:
push:
branches: [ master ]

env:
PACKAGE_MAJOR_VERSION: 5
PACKAGE_MINOR_VERSION: 0
CURRENT_REPO_URL: https://github.com/${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src

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

- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Generate version
run: echo "PACKAGE_VERSION=$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV

- name: Generate Package
run: dotnet pack -c Release -o out -p:PackageVersion=${{env.PACKAGE_VERSION}} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}

- name: Publish the package to nuget.org
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols true -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
35 changes: 35 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pull Request Analisys

on:
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src

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

- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Bogus" Version="29.0.2" />
<PackageReference Include="Jwks.Manager.AspNetCore" Version="4.0.4" />
<PackageReference Include="Jwks.Manager.Store.FileSystem" Version="4.0.4" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
<PackageReference Include="Bogus" Version="33.0.2" />
<PackageReference Include="NetDevPack.Security.JwtSigningCredentials.AspNetCore" Version="5.0.6" />
<PackageReference Include="NetDevPack.Security.JwtSigningCredentials.Store.FileSystem" Version="5.0.6" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.0" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bogus;
using Jwks.Manager.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens;
using NetDevPack.Security.JwtSigningCredentials.Interfaces;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Jwks.Manager.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using NetDevPack.Security.JwtSigningCredentials.AspNetCore;
using System.IO;

namespace ApiAuthenticator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
<Version>3.1.0</Version>
<Authors>Bruno Brito</Authors>
<PackageIconUrl>https://raw.githubusercontent.com/NetDevPack/NetDevPack/master/assets/IconNuget.png</PackageIconUrl>
Expand All @@ -15,9 +15,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.7.1" />
<PackageReference Include="System.Text.Json" Version="4.7.2" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.11.0" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,7 +11,6 @@
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Jwks.Manager.AspNetCore" Version="4.0.4" />
<PackageReference Include="Jwks.Manager.Store.FileSystem" Version="4.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
Expand All @@ -32,5 +31,11 @@
<ProjectReference Include="..\NetDevPack.Security.JwtExtensions.ApiTests\NetDevPack.Security.JwtExtensions.ApiTests.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.15" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.6" />
</ItemGroup>

</Project>

0 comments on commit 8c54984

Please sign in to comment.