-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
51 lines (43 loc) · 1.4 KB
/
azure-pipelines.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
jobs:
- job: Build
displayName: "Build, Test and Publish"
pool:
vmImage: ubuntu-latest
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'custom'
custom: 'pack'
arguments: './src/StaticWebAssets.sln -c Release -o packages'
displayName: 'Create NuGet Packages'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: './test/StaticAssetsTest.sln'
testRunTitle: 'Run unit tests'
displayName: 'Test for Assets Discovery'
- script: dotnet publish ./test/Website/Website.csproj -c Release -o publish
displayName: 'Test Project Publishing'
- task: NuGetAuthenticate@0
displayName: 'Authenticate with NuGet Feed'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: 'packages/**/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '5f8d36de-7004-4c36-a8b5-8a4bda9eb598/c2949ad7-bda3-4f23-a41b-3109c9419cb7'
allowPackageConflicts: true
displayName: 'Push to NuGet Feed'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')