Repository navigation
Expand file tree
/
Copy pathci-release.yaml
More file actions
64 lines (55 loc) · 2.19 KB
/
Copy pathci-release.yaml
File metadata and controls
64 lines (55 loc) · 2.19 KB
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
# set the version numbering, this results in 1.0.1 for the first build incrementing that way.
name: 1.0$(rev:.r)
# Defines that a commit to the master branch should trigger this build
trigger:
- master
- develop
- feature/*
# Defines that PRs against this branch should also trigger this build
pr:
- master
- develop
- feature/*
# the machine and prerequisites to run this build on
stages:
- stage: Build
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
- job: Build
pool:
vmImage: 'macOS-latest'
# all of the steps in this build
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.9.3'
inputs:
versionSpec: 4.9.3
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '**/*.sln'
# build and pack a beta version of the NuGet package. Versioning is done through the name tag in this definition.
- task: MSBuild@1
displayName: 'Build beta'
inputs:
solution: '**/MvvmUtils.csproj'
msbuildArguments: '/t:restore;build;pack /p:PackageVersion=$(Build.BuildNumber)-beta /p:PackageOutputPath=$(build.artifactstagingdirectory)/beta /p:AssemblyFileVersion=$(Build.BuildNumber) '
clean: true
# build and pack a final version of the NuGet package. Versioning is done through the name tag in this definition.
- task: MSBuild@1
displayName: 'Build final'
inputs:
solution: '**/MvvmUtils.csproj'
msbuildArguments: '/t:restore;build;pack /p:PackageVersion=$(Build.BuildNumber) /p:PackageOutputPath=$(build.artifactstagingdirectory)/final /p:AssemblyFileVersion=$(Build.BuildNumber) '
clean: true
# copy all the nupkg files created to the artifact directory
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(build.sourcesdirectory)'
Contents: '**\*.nupkg'
TargetFolder: '$(build.artifactstagingdirectory)'
# publish the artifacts as results of the build
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'