Update WebApi example System.IdentityModel.Tokens.Jwt to v5.7.0 #284
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- v* | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
# Run tests for PRs | |
pull_request: | |
env: | |
VAULT_ADDR: https://vault.eng.aserto.com/ | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
cfg: | |
- { project: Aserto.AspNetCore.Middleware, dotnet: 6.x} | |
- { project: Aserto.AspNetCore.Middleware, dotnet: 7.x} | |
- { project: Aserto.AspNetCore.Middleware, dotnet: 8.x} | |
- { project: Aserto.Clients, dotnet: 6.x } | |
- { project: Aserto.Clients, dotnet: 7.x } | |
- { project: Aserto.Clients, dotnet: 8.x } | |
name: Build ${{ matrix.cfg.project }} on ${{ matrix.cfg.dotnet }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.cfg.dotnet }} | |
- name: Build ${{ matrix.cfg.project }} | |
run: | | |
dotnet build src/${{ matrix.cfg.project }} | |
test: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
cfg: | |
- { project: Aserto.AspNetCore.Middleware.Tests } | |
name: Test ${{ matrix.cfg.project }} test. | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup dotnet 7.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.x | |
7.x | |
8.x | |
- name: Test Aserto.AspNetCore.Middleware | |
run: | | |
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info tests/${{ matrix.cfg.project }} | |
- name: Coveralls | |
continue-on-error: true | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: tests\${{ matrix.cfg.project }}\lcov.net7.info | |
release: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Read Configuration | |
uses: hashicorp/vault-action@v3 | |
id: vault | |
with: | |
url: ${{ env.VAULT_ADDR }} | |
token: ${{ secrets.VAULT_TOKEN }} | |
secrets: | | |
kv/data/nuget "NUGET_API_KEY" | NUGET_API_KEY; | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.x | |
7.x | |
8.x | |
- name: Build | |
run: dotnet build --configuration Release src/Aserto.AspNetCore.Middleware/Aserto.AspNetCore.Middleware.csproj | |
- name: Build clients | |
run: dotnet build --configuration Release src/Aserto.Clients/Aserto.Clients.csproj | |
- name: Publish to NuGet.org | |
run: | | |
dotnet nuget push ./src/Aserto.AspNetCore.Middleware/bin/Release/*.nupkg --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json | |
dotnet nuget push ./src/Aserto.Clients/bin/Release/*.nupkg --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json |