diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 0000000..1dd3f46 --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..1307e65 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -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 \ No newline at end of file diff --git a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/NetDevPack.Security.JwtExtensions.ApiAuthenticator.csproj b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/NetDevPack.Security.JwtExtensions.ApiAuthenticator.csproj index 5df9a86..408135e 100644 --- a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/NetDevPack.Security.JwtExtensions.ApiAuthenticator.csproj +++ b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/NetDevPack.Security.JwtExtensions.ApiAuthenticator.csproj @@ -1,14 +1,15 @@  - netcoreapp3.1 + netcoreapp3.1;net5.0 + - - - - + + + + diff --git a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Services/DummyAuthenticationService.cs b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Services/DummyAuthenticationService.cs index 16c81d5..dac5ea0 100644 --- a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Services/DummyAuthenticationService.cs +++ b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Services/DummyAuthenticationService.cs @@ -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; diff --git a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Startup.cs b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Startup.cs index d228956..fa1d973 100644 --- a/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Startup.cs +++ b/samples/NetDevPack.Security.JwtExtensions.ApiAuthenticator/Startup.cs @@ -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 diff --git a/samples/NetDevPack.Security.JwtExtensions.ApiClient/NetDevPack.Security.JwtExtensions.ApiClient.csproj b/samples/NetDevPack.Security.JwtExtensions.ApiClient/NetDevPack.Security.JwtExtensions.ApiClient.csproj index b52e2e2..01e208a 100644 --- a/samples/NetDevPack.Security.JwtExtensions.ApiClient/NetDevPack.Security.JwtExtensions.ApiClient.csproj +++ b/samples/NetDevPack.Security.JwtExtensions.ApiClient/NetDevPack.Security.JwtExtensions.ApiClient.csproj @@ -1,16 +1,22 @@ - netcoreapp3.1 + netcoreapp3.1;net5.0 - - - + + + + + + + + + diff --git a/src/NetDevPack.Security.JwtExtensions/NetDevPack.Security.JwtExtensions.csproj b/src/NetDevPack.Security.JwtExtensions/NetDevPack.Security.JwtExtensions.csproj index d40315e..b1c0c51 100644 --- a/src/NetDevPack.Security.JwtExtensions/NetDevPack.Security.JwtExtensions.csproj +++ b/src/NetDevPack.Security.JwtExtensions/NetDevPack.Security.JwtExtensions.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.0;netcoreapp3.1;net5.0 3.1.0 Bruno Brito https://raw.githubusercontent.com/NetDevPack/NetDevPack/master/assets/IconNuget.png @@ -15,9 +15,17 @@ - - - + + + + + + + + + + + diff --git a/tests/NetDevPack.Security.JwtExtensions.ApiTests/NetDevPack.Security.JwtExtensions.ApiTests.csproj b/tests/NetDevPack.Security.JwtExtensions.ApiTests/NetDevPack.Security.JwtExtensions.ApiTests.csproj index ff5acdd..d3ec24a 100644 --- a/tests/NetDevPack.Security.JwtExtensions.ApiTests/NetDevPack.Security.JwtExtensions.ApiTests.csproj +++ b/tests/NetDevPack.Security.JwtExtensions.ApiTests/NetDevPack.Security.JwtExtensions.ApiTests.csproj @@ -1,17 +1,21 @@ - netcoreapp3.1 + netcoreapp3.1;net5.0 - - - - - + + + + + + + + + diff --git a/tests/NetDevPack.Security.JwtExtensions.Tests/NetDevPack.Security.JwtExtensions.Tests.csproj b/tests/NetDevPack.Security.JwtExtensions.Tests/NetDevPack.Security.JwtExtensions.Tests.csproj index 465559a..4ea9a82 100644 --- a/tests/NetDevPack.Security.JwtExtensions.Tests/NetDevPack.Security.JwtExtensions.Tests.csproj +++ b/tests/NetDevPack.Security.JwtExtensions.Tests/NetDevPack.Security.JwtExtensions.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + netcoreapp3.1;net5.0 false @@ -11,7 +11,6 @@ - @@ -32,5 +31,11 @@ + + + + + +