Skip to content

Commit d4b09fc

Browse files
authored
Add NuGet Symbols Packaging (#219)
* Package and Publish Symbols for NuGet
1 parent 95a3bfb commit d4b09fc

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

AppInspector.CLI/AppInspector.CLI.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<ToolCommandName>appinspector</ToolCommandName>
2323
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2424
<PackageIcon>icon-128.png</PackageIcon>
25+
<IncludeSymbols>true</IncludeSymbols>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2527
</PropertyGroup>
2628

2729
<ItemGroup>

AppInspector/AppInspector.Commands.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
2424
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2525
<PackageIcon>icon-128.png</PackageIcon>
26+
<IncludeSymbols>true</IncludeSymbols>
27+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2628
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
2729
</PropertyGroup>
2830

Pipelines/core-pipeline.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ stages:
7676
displayName: Dotnet Publish Linux x64
7777
inputs:
7878
command: 'publish'
79-
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/linux/ApplicationInspector_$(ReleaseVersion) -r linux-x64 /p:DebugType=None'
79+
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/linux/ApplicationInspector_$(ReleaseVersion) -r linux-x64'
8080
publishWebProjects: false
8181
zipAfterPublish: false
8282
workingDirectory: 'AppInspector.CLI'
8383
- task: DotNetCoreCLI@2
8484
displayName: Dotnet Publish MacOS x64
8585
inputs:
8686
command: 'publish'
87-
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/macos/ApplicationInspector_$(ReleaseVersion) -r osx-x64 /p:DebugType=None'
87+
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/macos/ApplicationInspector_$(ReleaseVersion) -r osx-x64'
8888
publishWebProjects: false
8989
zipAfterPublish: false
9090
workingDirectory: 'AppInspector.CLI'
@@ -134,15 +134,15 @@ stages:
134134
displayName: Dotnet Publish Windows x86
135135
inputs:
136136
command: 'publish'
137-
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\windows\ApplicationInspector_$(ReleaseVersion) -r win-x86 /p:DebugType=None'
137+
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\windows\ApplicationInspector_$(ReleaseVersion) -r win-x86'
138138
publishWebProjects: false
139139
zipAfterPublish: false
140140
workingDirectory: 'AppInspector.CLI'
141141
- task: DotNetCoreCLI@2
142142
displayName: Dotnet Build .NET Core App
143143
inputs:
144144
command: 'build'
145-
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\netcoreapp\ApplicationInspector_$(ReleaseVersion) /p:DebugType=None'
145+
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\netcoreapp\ApplicationInspector_$(ReleaseVersion)'
146146
publishWebProjects: false
147147
zipAfterPublish: false
148148
workingDirectory: 'AppInspector.CLI'
@@ -151,13 +151,13 @@ stages:
151151
inputs:
152152
command: 'custom'
153153
custom: 'pack'
154-
arguments: 'AppInspector -c Release -o $(Build.BinariesDirectory)\nuget\ApplicationInspector_$(ReleaseVersion) /p:DebugType=None'
154+
arguments: 'AppInspector -c Release -o $(Build.BinariesDirectory)\nuget\ApplicationInspector_$(ReleaseVersion)'
155155
- task: DotNetCoreCLI@2
156156
displayName: Pack Nupkg (Dotnet Tool)
157157
inputs:
158158
command: 'custom'
159159
custom: 'pack'
160-
arguments: 'AppInspector.CLI -c Release -o $(Build.BinariesDirectory)\nuget\ApplicationInspector_$(ReleaseVersion) /p:DebugType=None'
160+
arguments: 'AppInspector.CLI -c Release -o $(Build.BinariesDirectory)\nuget\ApplicationInspector_$(ReleaseVersion)'
161161
- task: AntiMalware@3
162162
displayName: Anti-Malware Scan
163163
inputs:
@@ -395,7 +395,7 @@ stages:
395395
inputs:
396396
ConnectedServiceName: 'AppInspector_CodeSign'
397397
FolderPath: '$(Build.BinariesDirectory)/nuget/ApplicationInspector_$(ReleaseVersion)'
398-
Pattern: '*.nupkg'
398+
Pattern: '*.nupkg, *.snupkg'
399399
signConfigType: 'inlineSignParams'
400400
inlineOperation: |
401401
[
@@ -466,6 +466,12 @@ stages:
466466
inputs:
467467
targetType: 'inline'
468468
script: 'mv $env:BUILD_BINARIESDIRECTORY/nuget/ApplicationInspector_$(ReleaseVersion)/*.nupkg $env:BUILD_STAGINGDIRECTORY/'
469+
- task: PowerShell@2
470+
displayName: Move Symbols Packages
471+
inputs:
472+
targetType: 'inline'
473+
script: 'mv $env:BUILD_BINARIESDIRECTORY/nuget/ApplicationInspector_$(ReleaseVersion)/*.snupkg $env:BUILD_STAGINGDIRECTORY/'
474+
469475
- task: PublishPipelineArtifact@1
470476
displayName: Publish Signed Artifacts to Pipeline
471477
inputs:
@@ -488,7 +494,7 @@ stages:
488494
- task: NuGetCommand@2
489495
inputs:
490496
command: 'push'
491-
packagesToPush: '$(Build.StagingDirectory)/*.nupkg'
497+
packagesToPush: '$(Build.StagingDirectory)/*.nupkg, $(Build.StagingDirectory)/*.snupkg'
492498
nuGetFeedType: 'external'
493499
publishFeedCredentials: 'CST-E Nuget CI'
494500
verbosityPush: 'Normal'

0 commit comments

Comments
 (0)