Skip to content

Bump NUnit from 4.1.0 to 4.2.1 in /Source #98

Bump NUnit from 4.1.0 to 4.2.1 in /Source

Bump NUnit from 4.1.0 to 4.2.1 in /Source #98

Workflow file for this run

name: BuildTest
on: [push, pull_request]
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
defaults:
run:
working-directory: ./Source
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Dotnet clean
run: dotnet clean
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
publish_nuget:
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/v') # make sure deploy only runs on tags with version number
runs-on: windows-latest
defaults:
run:
working-directory: ./Source
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Dotnet clean
run: dotnet clean
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Pack nuget
run: |
$env:RELEASE_VERSION=($env:GITHUB_REF).split("tags/v")[-1]
echo $env:RELEASE_VERSION
echo $env:GITHUB_SHA
mkdir nupkg
dotnet pack -p:PackageVersion=$env:RELEASE_VERSION -o $PWD\nupkg -p:RepositoryCommit=$env:GITHUB_SHA --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
- name: Publish nuget
run: |
cd nupkg
dotnet nuget push "**/*.nupkg" --api-key ${{secrets.NUGET_DEPLOY_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate