-
Notifications
You must be signed in to change notification settings - Fork 20
/
azure-pipelines.yml
67 lines (63 loc) · 2.61 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
trigger:
branches:
include:
- master
- feature/*
tags:
include:
- '*'
resources:
repositories:
- repository: recommended_practices
type: github
name: endjin/Endjin.RecommendedPractices.AzureDevopsPipelines.GitHub
endpoint: ais-dotnet-github
jobs:
- template: templates/build.and.release.yml@recommended_practices
parameters:
vmImage: 'ubuntu-latest'
service_connection_nuget_org: $(Endjin_Service_Connection_NuGet_Org)
service_connection_github: $(Endjin_Service_Connection_GitHub)
solution_to_build: $(Endjin_Solution_To_Build)
preCustomEnvironmentVariables:
- task: UseDotNet@2
displayName: 'Install .NET SDK 6.0'
inputs:
packageType: sdk
version: 6.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
postSpecs:
- task: DotNetCoreCLI@2
displayName: 'Run benchmarks'
inputs:
command: 'run'
projects: $(Build.SourcesDirectory)/Solutions/Ais.Net.Benchmarks/Ais.Net.Benchmarks.csproj
arguments: '--configuration Release --no-build $(Build.SourcesDirectory)/Solutions/Ais.Net.Benchmarks/BenchmarkDotNet.Artifacts $(GitVersion.SemVer)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: benchmark'
inputs:
artifactName: 'benchmark'
PathtoPublish: '$(Build.SourcesDirectory)/Solutions/Ais.Net.Benchmarks/BenchmarkDotNet.Artifacts/results'
- bash: |
wget -q https://github.com/dotnet/docfx/releases/download/v2.45.1/docfx.zip
unzip docfx.zip -d docfx
mono docfx/docfx.exe $(Build.SourcesDirectory)/Documentation/docfx.json
displayName: "docfx build"
failOnStderr: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: docsite'
inputs:
artifactName: 'docsite'
PathtoPublish: '$(Build.SourcesDirectory)/Documentation/_site'
- bash: |
git clone https://endjin-github:$(GitHub_Pages_PAT)@github.com/ais-dotnet/Ais.Net.git --branch=gh-pages $(System.DefaultWorkingDirectory)/ghpages
cp $(Build.SourcesDirectory)/Documentation/_site/* $(System.DefaultWorkingDirectory)/ghpages -r
cd $(System.DefaultWorkingDirectory)/ghpages
git config core.autocrlf false
git config user.email [email protected]
git config user.name ais-dotnet
git add *
git commit --allow-empty -m "Documentation for $(GitVersion.PreReleaseTag)"
git push origin gh-pages
displayName: 'Publish documentation to GitHub Pages'
condition: and(succeeded(), or(variables['Endjin.ForceDocPublish'], eq(variables['GitVersion.PreReleaseTag'], '')))