-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
41 lines (34 loc) · 1.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
# https://aka.ms/yaml
trigger:
- master
- Dev
pool:
vmImage: 'windows-2019'
variables:
buildConfiguration: 'Release'
version: '1.0.0'
steps:
- task: knom.regexreplace-task.regex-replace.RegexReplace@3
displayName: 'Set Version'
inputs:
InputSearchPattern: '**\*.csproj'
FindRegex: '<VersionPrefix></VersionPrefix>'
ReplaceRegex: '<VersionPrefix>$(version)</VersionPrefix>'
- script: |
dotnet build --configuration $(buildConfiguration)
dotnet test test\Paravaly.Tests\Paravaly.Tests.csproj --configuration $(buildConfiguration) --logger trx --no-build
dotnet pack src\Paravaly
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- task: NuGetCommand@2
condition: and(succeeded(), not(variables['skipNuGet']), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'Paravaly-NuGet'
packagesToPush: '**/Paravaly*.nupkg'
versioningScheme: byEnvVar
versionEnvVar: version