Skip to content

Commit

Permalink
Add parameter to disable symbol package creation during publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Friedrich committed Aug 4, 2022
1 parent 2cb188f commit c6c0bcd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/publish-nuget/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.521000.bestmunity/t/resuable-called-workflow-environment-variables-secrets-and-trigger-event-access/207723/2
Expand Down Expand Up @@ -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 }}

0 comments on commit c6c0bcd

Please sign in to comment.