Bump NUnit from 4.1.0 to 4.2.2 #321
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/CD | |
env: | |
VERSION_NUMBER: 2.0.0 | |
NUGET_KEY: ${{ secrets.NUGET_API_KEY }} | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- release/* | |
pull_request: | |
branches: [develop] | |
workflow_dispatch: | |
jobs: | |
open-source-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Analyse with FOSSA | |
uses: fossa-contrib/fossa-action@v3 | |
with: | |
fossa-api-key: ecbc9c822e743eac0304c1cafcd2136e | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test ./test/DeepSecure.ThreatRemoval.Test/DeepSecure.ThreatRemoval.Test.csproj --no-restore --verbosity normal --logger "junit;LogFileName=results.xml" | |
- name: Publish Unit Test Results | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
with: | |
files: "**/TestResults/*.xml" | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build-and-test,open-source-scan] | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Output Version Number | |
run: echo "Version-$VERSION_NUMBER.$GITHUB_RUN_NUMBER" | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Package | |
run: dotnet pack ./src/DeepSecure.ThreatRemoval/DeepSecure.ThreatRemoval.csproj -c Release /P:PackageVersion=$VERSION_NUMBER.$GITHUB_RUN_NUMBER | |
- name: Publish | |
run: nuget push ./src/DeepSecure.ThreatRemoval/bin/Release/DeepSecure.ThreatRemoval.$VERSION_NUMBER.$GITHUB_RUN_NUMBER.nupkg -ApiKey $NUGET_KEY -NonInteractive -Source https://www.nuget.org/api/v2/package |