-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yaml
52 lines (49 loc) · 1.63 KB
/
azure-pipelines.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pool:
vmImage: 'ubuntu-16.04' # 'vs2017-win2016' https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
steps:
- task: DeleteFiles@1
inputs:
sourceFolder: '$(Agent.BuildDirectory)'
contents: '**/*.nupkg'
- task: DotNetCoreInstaller@0 # task@version, e.g. "VSBuild@1"
enabled: false # DISABLED!
displayName: 'Install .NET Core on build server'
inputs:
version: '2.2.104'
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet packages'
inputs:
command: 'restore'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Run tests'
enabled: false # DISABLED!
inputs:
command: 'test'
projects: '**/*.csproj'
publishTestResults: true # Optional
#testRunTitle: # Optional
- task: DotNetCoreCLI@2
displayName: 'Package NuGet packages in src'
inputs:
command: 'pack'
configuration: 'release'
packagesToPack: 'src/**/Evoq.Surfdude*.csproj'
packDirectory: '$(build.artifactStagingDirectory)'
verbosityPack: 'normal'
# versioningScheme: 'byBuildNumber'
- task: PowerShell@2
displayName: 'Push to NuGet.org'
inputs:
targetType: 'filePath'
filePath: 'build/Publish-ToNuGet.ps1'
arguments: '-PackageSpec $(Build.ArtifactStagingDirectory)/Surfdude*.nupkg -ApiKey $(azure-pipelines-evoq-nuget-apikey)'
#- task: DotNetCoreCLI@2
# displayName: 'Push this package to the feed'
# inputs:
# command: 'push'
# nuGetFeedType: 'external'
# packagesToPush: '$(build.artifactStagingDirectory)/Surfdude*.nupkg'
# feedsToUse: 'select'
# includeNuGetOrg: true
# externalFeedCredentials: $(azure-pipelines-evoq-nuget-apikey)