Skip to content

Minor code analysis fixes #26

Minor code analysis fixes

Minor code analysis fixes #26

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: NuGet
on:
push:
tags:
- '**'
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: pwsh
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE: 'true'
DOTNET_DISABLE_GUI_ERRORS: 1
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
DOTNET_NOLOGO: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
POWERSHELL_UPDATECHECK: 'Off'
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- name: Restore
run: dotnet restore -p:Configuration=Release
- name: Strong Name Key Pair
run: |
$snk = [Convert]::FromBase64String('${{ secrets.STRONG_NAME_KEY }}')
[IO.File]::WriteAllBytes("$env:GITHUB_WORKSPACE\keypair.snk", $snk)
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: |
dotnet test --no-build -c Release -p:TestTfmsInParallel=false --verbosity normal
- name: Clean
run: dotnet clean
- name: Pack
run: |
$snk = "$env:GITHUB_WORKSPACE\keypair.snk"
try {
dotnet pack "$(dir TBC.Common.Configuration.Registry.csproj -recurse | select -first 1 -expand FullName)" -c Release "-p:SourceRevisionId=$(git rev-parse --short $env:GITHUB_SHA)" -p:SignAssembly=True -p:DelaySign=False "-p:AssemblyOriginatorKeyFile=$snk"
}
finally {
del $snk -force -verbose
}
- name: Push
run: dotnet nuget push "**\*.nupkg" -k "${{ secrets.NUGET_API_KEY }}" -s "https://api.nuget.org/v3/index.json" -n --skip-duplicate --force-english-output