Skip to content

Commit 9de5086

Browse files
authored
Setup CI with Azure Pipelines (#1)
* Set up CI with Azure Pipelines [skip ci] * Update azure-pipelines.yml
1 parent eb67ca7 commit 9de5086

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

azure-pipelines.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: $(GITVERSION_SemVer)
2+
3+
trigger:
4+
- main
5+
6+
pool:
7+
name: Azure Pipelines
8+
vmImage: 'windows-latest'
9+
10+
steps:
11+
12+
- task: NuGetToolInstaller@1
13+
displayName: 'Use NuGet'
14+
15+
- checkout: self
16+
fetchDepth: 0
17+
18+
- task: gitversion/setup@0
19+
displayName: Setup GitVersion
20+
inputs:
21+
versionSpec: '5.x'
22+
23+
- task: gitversion/execute@0
24+
displayName: Execute GitVersion
25+
26+
- task: NuGetCommand@2
27+
displayName: 'NuGet restore'
28+
29+
- task: VSBuild@1
30+
displayName: 'Build Solution'
31+
inputs:
32+
clean: true
33+
solution: '**\*.sln'
34+
configuration: 'release'
35+
msbuildArchitecture: 'x64'
36+
37+
- task: DotNetCoreCLI@2
38+
displayName: 'Create NuGet Package'
39+
inputs:
40+
command: 'pack'
41+
packagesToPack: '*.csproj'
42+
packDirectory: 'artifacts/nuget'
43+
versioningScheme: 'byEnvVar'
44+
versionEnvVar: 'GITVERSION_NuGetVersion'
45+
configuration: 'release'
46+
47+
- task: ArchiveFiles@2
48+
inputs:
49+
rootFolderOrFile: '$(Build.SourcesDirectory)\bin\Release\net472'
50+
includeRootFolder: false
51+
archiveType: 'zip'
52+
archiveFile: 'artifacts/template/$(Build.DefinitionName)-v$(Build.BuildNumber).zip'
53+
replaceExistingArchive: true
54+
55+
- task: PublishBuildArtifacts@1
56+
inputs:
57+
PathtoPublish: './artifacts'
58+
ArtifactName: 'drop'
59+
TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)'

0 commit comments

Comments
 (0)