forked from simplic/simplic-icon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
70 lines (67 loc) · 1.89 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
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/*
- azure-pipelines.yml
pr:
branches:
include:
- "*"
pool:
vmImage: windows-latest
variables:
buildConfiguration: Release
resources:
repositories:
- repository: infrastructure
type: github
name: simplic/build-infrastructure
endpoint: simplic-bot
steps:
- task: NuGetToolInstaller@1
inputs:
versionSpec: 5.x
- task: NuGetCommand@2
inputs:
command: restore
restoreSolution: "**/*.sln"
feedsToUse: select
vstsFeed: f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e
- task: MSBuild@1
inputs:
solution: "**/*.sln"
configuration: $(buildConfiguration)
- ${{ if not(eq(variables['Build.Reason'], 'PullRequest')) }}:
- template: version-number-update-template.yml@infrastructure
parameters:
connection_string: $(connection_string)
git_user: $(git_user)
git_pass: $(git_pass)
branch_name:
${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '')
}}
- task: VSTest@2
inputs:
testSelector: testAssemblies
testAssemblyVer2: '**\Simplic.Icon.Test.dll
!**\*TestAdapter.dll
!**\obj\**
'
- task: NuGetCommand@2
inputs:
command: pack
packagesToPack: src/Simplic.Icon**/*.csproj;!src/Simplic.Icon.Test/Simplic.Icon.Test.csproj
configuration: $(buildConfiguration)
versioningScheme: "off"
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: push
packagesToPush: $(Build.ArtifactStagingDirectory)/Simplic.Icon.*.nupkg;!$(Build.ArtifactStagingDirectory)/Simplic.Icon.*.symbols.nupkg
nuGetFeedType: internal
publishVstsFeed: f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e
allowPackageConflicts: true