-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
44 lines (37 loc) · 1.21 KB
/
azure-pipelines.yml
File metadata and controls
44 lines (37 loc) · 1.21 KB
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
trigger:
- main
pool:
name: Default
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '8.x'
- task: DotNetCoreCLI@2
displayName: 'Restore'
inputs:
command: 'restore'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Pack NuGet'
inputs:
command: 'pack'
packagesToPack: '**/*.csproj'
configuration: $(buildConfiguration)
outputDir: '$(Build.ArtifactStagingDirectory)'
- task: PowerShell@2
displayName: 'Push to Artifacts Feed'
inputs:
targetType: 'inline'
script: |
dotnet nuget remove source "Lab4_NuGetFeed" 2>$null
dotnet nuget add source "https://pkgs.dev.azure.com/nflordel/d34c6e76-6cb3-478b-a0e0-58714e0931a5/_packaging/Lab4_Feed/nuget/v3/index.json" --name "Lab4_Feed" --username "nflordel" --password "$(NUGET_PAT)" --store-password-in-clear-text
dotnet nuget push "$(Build.ArtifactStagingDirectory)\*.nupkg" --source "Lab4_Feed" --api-key "VSTS" --skip-duplicate