This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
72 lines (72 loc) · 2.06 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: 2.1.1-ci.$(Date:yyyyMMdd).$(Rev:r) # equal to $(Build.BuildNumber)
trigger:
branches:
include:
- dev
- master
- hotfix/*
- release/*
variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: 'test'
configuration: 'Release'
projects: 'test/**/*.csproj'
publishTestResults: true
- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: 'test'
configuration: 'Release'
projects: 'test/**/*.csproj'
publishTestResults: true
- task: DotNetCoreCLI@2
displayName: 'Package'
inputs:
command: 'pack'
configuration: 'Release'
buildProperties: 'Version=$(Build.BuildNumber)'
packagesToPack: 'src/AD.OpenXml/AD.OpenXml.csproj'
packDirectory: '$(System.DefaultWorkingDirectory)'
verbosityPack: 'normal'
# BUG: https://github.com/Microsoft/azure-pipelines-tasks/issues/7160
# - task: DotNetCoreCLI@2
- task: NuGetToolInstaller@0
inputs:
versionSpec: '4.3.0'
- task: NuGetCommand@2
displayName: 'Publish to MyGet (unstable)'
condition: succeeded()
inputs:
command: 'push'
nuGetFeedType: 'external'
packagesToPush: '**/*.nupkg'
publishFeedCredentials: 'myget-unstable'
- task: NuGetCommand@2
displayName: 'Publish to MyGet (stable)'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'dev'))
inputs:
command: 'push'
nuGetFeedType: 'external'
packagesToPush: '**/*.nupkg'
publishFeedCredentials: 'myget-stable'
- task: NuGetCommand@2
displayName: 'Publish to NuGet'
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranchName'], 'release/'), startsWith(variables['Build.SourceBranchName'], 'hotfix/')))
inputs:
command: 'push'
nuGetFeedType: 'external'
packagesToPush: '**/*.nupkg'
publishFeedCredentials: 'nuget'