-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
72 lines (63 loc) · 2.27 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: $(ReleaseVersionNumber) Build $(Build)
variables:
ReleaseVersionNumber: 3.0.0
Build: $[counter(variables['ReleaseVersionNumber'], 1)]
PrereleaseVersionNumber: $(ReleaseVersionNumber)-beta$(Build)
AssemblyVersion: $(ReleaseVersionNumber).$(Build)
InformationalVersion: $(ReleaseVersionNumber) build $(Build)
trigger:
paths:
include:
- src
jobs:
- job:
displayName: 'Build, test, pacakge'
pool:
vmImage: windows-latest
steps:
- checkout: self
persistCredentials: true
- task: DotNetCoreCLI@2
displayName: Restore packages
inputs:
command: restore
configuration: release
projects: |
**/*.csproj
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: --no-restore -c release -p:Version=$(AssemblyVersion) -p:"InformationalVersion=$(InformationalVersion)"
projects: |
src/**/*.csproj
- task: DotNetCoreCLI@2
displayName: Pack for unstable
inputs:
command: custom
custom: pack
arguments: --no-build -c release -p:PackageVersion=$(PrereleaseVersionNumber) -o $(Build.ArtifactStagingDirectory)/cicd
projects: |
src/**/*.csproj
- task: DotNetCoreCLI@2
displayName: Pack for stable
inputs:
command: custom
custom: pack
arguments: --no-build -c release -p:PackageVersion=$(ReleaseVersionNumber) -o $(Build.ArtifactStagingDirectory)/dist
projects: |
src/**/*.csproj
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
- task: chrismason.vsts-docfxtasks.docfx-extension-build-task.DocFxTask@0
displayName: 'Generate Documentation'
inputs:
solution: '$(System.DefaultWorkingDirectory)/docfx_project/docfx.json'
- script: |
git config --global user.email "[email protected]"
git config --global user.name "Build Agent"
git add *
git commit -a -m "Updated docs version $(Build.BuildNumber)"
git push origin HEAD:master
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: Commit and Push docs