forked from amaggiulli/QLNet
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
82 lines (73 loc) · 2.18 KB
/
azure-pipelines.yml
File metadata and controls
82 lines (73 loc) · 2.18 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
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
73
74
75
76
77
78
79
80
81
82
#This is a bit wrong way around as QF used develop branch to make their fork
#master branch is now behind.
#When QLNet publishes a new version by pull request to master we should:
# 1 merge its master to our master
# 2 merge our develop branch to our master
# 3 modify this yaml to release from master
trigger:
branches:
include:
- master
- develop
pr:
- master
- develop
pool:
vmImage: 'windows-2019'
variables:
- name: BuildConfiguration
value: Release
- name: 'Version.MajorMinor'
value: 1.11
# Counter for each build run.
- name: Version.Revision
value: $[counter(variables['Version.MajorMinor'], 0)]
- name: NUGET_VERSION
value: $(Version.MajorMinor).$(Version.Revision).$(Build.BuildID)
- name: Projects
value: '**/QLNet.sln'
steps:
- script: echo $(Version.MajorMinor).$(Version.Revision).$(Build.BuildID)
- powershell:
env:
NUGET_VERSION: $(Version.MajorMinor).$(Version.Revision).$(Build.BuildID)
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '$(Projects)'
vstsFeed: '8485f31c-8383-4a52-9f73-cb780c09dd25'
- task: DotNetCoreCLI@2
displayName: 'Build solution'
inputs:
command: 'build'
projects: '$(Projects)'
arguments: '--configuration $(BuildConfiguration)'
feedsToUse: 'select'
versioningScheme: 'off'
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
projects: '$(Projects)'
arguments: '--configuration $(BuildConfiguration) --collect "Code Coverage"'
publishTestResults: true
feedsToUse: 'select'
versioningScheme: 'off'
- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
command: 'pack'
packagesToPack: '**/QLNet.csproj'
includesymbols: true
nobuild: true
versioningScheme: 'byEnvVar'
versionEnvVar: 'NUGET_VERSION'
- task: NuGetCommand@2
displayName: 'Publish to Nuget.org from develop branch only'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'RiskFirst Nuget.org'