-
Notifications
You must be signed in to change notification settings - Fork 0
/
dotnet-core-nuget-publish-internal.yml
38 lines (30 loc) · 1.2 KB
/
dotnet-core-nuget-publish-internal.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
trigger:
-
# name will be used for auto versioning (https://stackoverflow.com/a/56111209/6332983)
name: $(majorMinorVersion).$(semanticVersion)
variables:
- name: buildConfiguration
value: "Release"
- name: majorMinorVersion
value: 1.0
- name: semanticVersion
value: $[counter(variables['majorMinorVersion'], 0)]
pool:
name: Azure Pipelines
vmImage: 'windows-latest'
- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
command: pack
arguments: '--configuration $(buildConfiguration)'
packagesToPack: '**/*.csproj' # or you can give the specific project like '**/SampleProject.csproj'
versioningScheme: byBuildNumber
- task: DotNetCoreCLI@2
displayName: 'Nuget Push'
inputs:
command: push
packagesToPack: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
feedsToUse: select
nuGetFeedType: internal
publishVstsFeed: 'feedName' # for global feeds just the feed name, for project scoped feeds: 'projectName/feedName'
# dot net core cli task Microsoft Documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops