-
Notifications
You must be signed in to change notification settings - Fork 37
/
azure-pipelines.yml
60 lines (55 loc) · 1.31 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
trigger:
branches:
include:
- '*'
- refs/tags/*
jobs:
- job: Build_Windows
pool:
vmImage: 'windows-latest'
steps:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- bash: |
./build.sh
displayName: 'Build'
env:
COVERALLS_REPO_TOKEN: '$(COVERALLS_REPO_TOKEN)'
- bash: |
./build-sample.sh
displayName: 'Build Sample'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/cobertura.xml'
- job: Build_Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- bash: |
./build.sh
displayName: 'Build'
- job: Push_Package
dependsOn:
- Build_Windows
- Build_Linux
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- bash: |
export Version=${TagName:1}
dotnet pack -c Release -o nupkg
dotnet nuget push "nupkg/*.nupkg" -k $NUGET_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
env:
TagName: '$(Build.SourceBranchName)'
NUGET_KEY: '$(NUGET_KEY)'
displayName: 'Release'