Bump NUnit.Analyzers from 4.5.0 to 4.6.0 in /Source #134
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: 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: 9.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: 9.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 |