Skip to content

Commit 8c54984

Browse files
committed
update .NET 5
1 parent 51ea2cc commit 8c54984

File tree

9 files changed

+122
-23
lines changed

9 files changed

+122
-23
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Master - Publish packages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
env:
8+
PACKAGE_MAJOR_VERSION: 5
9+
PACKAGE_MINOR_VERSION: 0
10+
CURRENT_REPO_URL: https://github.com/${{ github.repository }}
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: src
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Setup .NET 5
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 5.0.x
27+
28+
- name: Setup .NET Core 3.1
29+
uses: actions/setup-dotnet@v1
30+
with:
31+
dotnet-version: 3.1.x
32+
33+
- name: Generate version
34+
run: echo "PACKAGE_VERSION=$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
35+
36+
- name: Generate Package
37+
run: dotnet pack -c Release -o out -p:PackageVersion=${{env.PACKAGE_VERSION}} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
38+
39+
- name: Publish the package to nuget.org
40+
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols true -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json

.github/workflows/pull-request.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Pull Request Analisys
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: ./src
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Setup .NET 5
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 5.0.x
22+
23+
- name: Setup .NET Core 3.1
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 3.1.x
27+
28+
- name: Restore dependencies
29+
run: dotnet restore
30+
31+
- name: Build
32+
run: dotnet build --no-restore
33+
34+
- name: Test
35+
run: dotnet test --no-build

samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/NetDevPack.Security.JwtExtensions.ApiAuthenticator.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55
</PropertyGroup>
66

7+
78
<ItemGroup>
8-
<PackageReference Include="Bogus" Version="29.0.2" />
9-
<PackageReference Include="Jwks.Manager.AspNetCore" Version="4.0.4" />
10-
<PackageReference Include="Jwks.Manager.Store.FileSystem" Version="4.0.4" />
11-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
9+
<PackageReference Include="Bogus" Version="33.0.2" />
10+
<PackageReference Include="NetDevPack.Security.JwtSigningCredentials.AspNetCore" Version="5.0.6" />
11+
<PackageReference Include="NetDevPack.Security.JwtSigningCredentials.Store.FileSystem" Version="5.0.6" />
12+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.0" />
1213
</ItemGroup>
1314

1415

samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Services/DummyAuthenticationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using Bogus;
2-
using Jwks.Manager.Interfaces;
32
using Microsoft.AspNetCore.Http;
43
using Microsoft.Extensions.Configuration;
54
using Microsoft.IdentityModel.Tokens;
5+
using NetDevPack.Security.JwtSigningCredentials.Interfaces;
66
using System;
77
using System.IdentityModel.Tokens.Jwt;
88
using System.Security.Claims;

samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using Jwks.Manager.AspNetCore;
21
using Microsoft.AspNetCore.Builder;
32
using Microsoft.AspNetCore.Hosting;
43
using Microsoft.Extensions.Configuration;
54
using Microsoft.Extensions.DependencyInjection;
65
using Microsoft.Extensions.Hosting;
6+
using NetDevPack.Security.JwtSigningCredentials.AspNetCore;
77
using System.IO;
88

99
namespace ApiAuthenticator
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
9-
</ItemGroup>
107

118
<ItemGroup>
129
<ProjectReference Include="..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
1310
</ItemGroup>
1411

12+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
13+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
14+
</ItemGroup>
15+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
16+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
17+
</ItemGroup>
18+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
19+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
20+
</ItemGroup>
1521

1622
</Project>

src/NetDevPack.Security.JwtExtensions/NetDevPack.Security.JwtExtensions.csproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

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

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
19-
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.7.1" />
20-
<PackageReference Include="System.Text.Json" Version="4.7.2" />
18+
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.11.0" />
19+
<PackageReference Include="System.Text.Json" Version="5.0.2" />
2120
</ItemGroup>
2221

22+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
23+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
24+
</ItemGroup>
25+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
26+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
27+
</ItemGroup>
28+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
29+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
30+
</ItemGroup>
2331
</Project>
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55
</PropertyGroup>
66

77

8-
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
10-
</ItemGroup>
11-
12-
138
<ItemGroup>
149
<ProjectReference Include="..\..\src\NetDevPack.Security.JwtExtensions\NetDevPack.Security.JwtExtensions.csproj" />
1510
</ItemGroup>
1611

12+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
13+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
14+
</ItemGroup>
15+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
16+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.15" />
17+
</ItemGroup>
18+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
19+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
20+
</ItemGroup>
1721
</Project>

tests/NetDevPack.Security.JwtExtensions.Tests/NetDevPack.Security.JwtExtensions.Tests.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
@@ -11,7 +11,6 @@
1111
<PackageReference Include="FluentAssertions" Version="5.10.3" />
1212
<PackageReference Include="Jwks.Manager.AspNetCore" Version="4.0.4" />
1313
<PackageReference Include="Jwks.Manager.Store.FileSystem" Version="4.0.4" />
14-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.6" />
1514
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
1615
<PackageReference Include="xunit" Version="2.4.1" />
1716
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
@@ -32,5 +31,11 @@
3231
<ProjectReference Include="..\NetDevPack.Security.JwtExtensions.ApiTests\NetDevPack.Security.JwtExtensions.ApiTests.csproj" />
3332
</ItemGroup>
3433

34+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
35+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.15" />
36+
</ItemGroup>
37+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
38+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.6" />
39+
</ItemGroup>
3540

3641
</Project>

0 commit comments

Comments
 (0)