From c6c0bcd463c2dce264e58448daee40591ae40335 Mon Sep 17 00:00:00 2001 From: Oliver Friedrich Date: Thu, 4 Aug 2022 14:34:22 +0200 Subject: [PATCH] Add parameter to disable symbol package creation during publish --- .github/actions/publish-nuget/action.yml | 6 +++++- .github/workflows/publish-nuget.yml | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/publish-nuget/action.yml b/.github/actions/publish-nuget/action.yml index 40e5e796e..cd5a5e266 100644 --- a/.github/actions/publish-nuget/action.yml +++ b/.github/actions/publish-nuget/action.yml @@ -16,6 +16,10 @@ inputs: description: > Additional warning codes for the `-p:NoWarn=` argument of `dotnet pack`. The items can be separated by any whitespace, including newlines. + dotnet-pack-include-symbols: + required: false + default: "true" + description: If set to "true", a symbol package will be created together with the NuGet package. secrets: API_KEY: required: true @@ -120,7 +124,7 @@ runs: "-p:NoWarn=$($noWarn -join '%3B')", "-p:TreatWarningsAsErrors=true", "-p:WarnOnPackingNonPackableProject=True", - "-p:IncludeSymbols=true", + "-p:IncludeSymbols=${{ inputs.dotnet-pack-include-symbols }}", "-p:SymbolPackageFormat=snupkg", "-p:NoDefaultExcludes=true" ) diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index 6796dc487..7e0ef4f7e 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -30,6 +30,11 @@ on: description: > Additional warning codes for the `-p:NoWarn=` argument of `dotnet pack`. The items can be separated by any whitespace, including newlines. + dotnet-pack-include-symbols: + required: false + type: string + default: "true" + description: If set to "true", a symbol package will be created together with the NuGet package. secrets: # We can't access org secrets here so they need to be passed in, see: # https://github.community/t/resuable-called-workflow-environment-variables-secrets-and-trigger-event-access/207723/2 @@ -61,5 +66,6 @@ jobs: source: ${{ inputs.source }} verbosity: ${{ inputs.verbosity }} dotnet-pack-ignore-warning: ${{ inputs.dotnet-pack-ignore-warning }} + dotnet-pack-include-symbols: ${{ inputs.dotnet-pack-include-symbols }} env: API_KEY: ${{ secrets.API_KEY }}