Bump System.IdentityModel.Tokens.Jwt from 6.5.0 to 6.34.0 in /src/Shared.WebApi.Core #17
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: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: ${GITHUB_REF#refs/heads/} | |
MAJOR_VERSION: 1 | |
MINOR_VERSION: 1 | |
PATCH_VERSION: 0 | |
BUILD_VERSION: $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION.${GITHUB_RUN_NUMBER} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Define build number | |
id: define_build_number | |
run: | | |
buildNumber=$(echo ${{ env.BUILD_VERSION }}) | |
branchName=$(echo ${{ env.BRANCH_NAME }} | sed 's:.*/::') | |
buildId=$buildNumber-$branchName | |
if [[ "$branchName" == "master" ]]; then | |
buildId=$buildNumber | |
fi | |
echo $buildNumber | |
echo $branchName | |
echo $buildId | |
echo "##[set-output name=BUILD_NUMBER;]$(echo $buildId)" | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.301 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1.0.5 | |
- name: Restore dependencies | |
run: dotnet restore $GITHUB_WORKSPACE/src | |
- name: Build | |
run: dotnet build $GITHUB_WORKSPACE/src --no-restore --configuration "Release" /p:Version=${{ steps.define_build_number.outputs.BUILD_NUMBER }} | |
- name: Test | |
run: dotnet test $GITHUB_WORKSPACE/src --no-build --no-restore --configuration "Release" | |
- name: Pack | |
run: nuget pack **/*.nuspec -BasePath $GITHUB_WORKSPACE/src -OutputDirectory $GITHUB_WORKSPACE/build/ -Version ${{ steps.define_build_number.outputs.BUILD_NUMBER }} -properties Configuration=Release | |
- name: Push | |
run: dotnet nuget push $GITHUB_WORKSPACE/build/Shared.WebApi.Core.*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGET_ACCESS_TOKEN }} | |
- name: SonarCloud | |
uses: highbyte/sonarscan-dotnet@1.0.2 | |
with: | |
sonarProjectKey: Shared-WebApi-Core | |
sonarProjectName: Shared-WebApi-Core | |
sonarOrganization: krylixza | |
dotnetBuildArguments: ./src | |
dotnetTestArguments: ./src --logger trx --output "../TestResults/" -p:CollectCoverage=true -p:CoverletOutputFormat="json%2copencover" -p:CoverletOutput="../TestResults/" -p:MergeWith="../TestResults/coverage.json" | |
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" |