Skip to content

Commit 4c63619

Browse files
committed
Work CD-CI
- Fix wrong version setting when packaging NuGet. - Improve NuGet push tasks. Signed-off-by: José Simões <[email protected]>
1 parent 4bef513 commit 4c63619

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

azure-pipelines.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,15 @@ jobs:
6060
- task: NuGetCommand@2
6161
inputs:
6262
command: 'custom'
63-
arguments: 'pack source\$(nugetPackageName).nuspec -Version 1.0.2-preview-020'
63+
arguments: 'pack source\$(nugetPackageName).nuspec -Version $(NBGV_Version)'
6464
displayName: Pack NuGet with class library
6565

66+
# - task: NuGetCommand@2
67+
# inputs:
68+
# command: 'custom'
69+
# arguments: 'pack source\$(nugetPackageName).DELIVERABLES.nuspec -Version $(NBGV_Version)'
70+
# displayName: Pack NuGet with build deliverables class library
71+
6672
- task: CopyFiles@1
6773
inputs:
6874
sourceFolder: $(Build.SourcesDirectory)
@@ -86,17 +92,17 @@ jobs:
8692
inputs:
8793
command: push
8894
nuGetFeedType: external
89-
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
95+
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg;!$(Build.ArtifactStagingDirectory)/*.symbols.nupkg'
9096
publishFeedCredentials: 'MyGet'
9197
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest') )
9298
displayName: Push NuGet packages to MyGet
9399

94-
# push NuGet packages to NuGet (happens on tag builds for any branch)
100+
# push NuGet class lib package to NuGet (happens on tag builds for any branch)
95101
- task: NuGetCommand@2
96102
inputs:
97103
command: push
98104
nuGetFeedType: external
99-
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
105+
packagesToPush: '$(Build.ArtifactStagingDirectory)/$(nugetPackageName).nupkg;!$(Build.ArtifactStagingDirectory)/$(nugetPackageName).symbols.nupkg'
100106
publishFeedCredentials: 'NuGet'
101107
condition: and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.SourceBranchName'], 'tags') )
102108
displayName: Push NuGet packages to NuGet

0 commit comments

Comments
 (0)