-
Notifications
You must be signed in to change notification settings - Fork 96
/
cd-pipeline.yml
60 lines (49 loc) · 2.21 KB
/
cd-pipeline.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
variables:
MONO_VERSION: 6_12_0
NETCORE_VERSION: '5.0.x'
# set the version numbering, this results in 1.0.1 for the first build incrementing that way.
name: 3.6$(rev:.r)
# Defines that a commit to the master branch should trigger this build
trigger:
- master
# Defines that PRs against this branch should also trigger this build
pr:
- master
# the machine and prerequisites to run this build on
pool:
vmImage: macOS-10.15
# The different steps in our build
steps:
- bash: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MONO_VERSION)
displayName: Switch to the latest Xamarin SDK
- task: UseDotNet@2
displayName: 'Use .Net Core sdk'
inputs:
version: $(NETCORE_VERSION)
includePreviewVersions: false
# 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 & Pack beta build'
inputs:
solution: 'src/Plugin.PushNotification/Plugin.PushNotification.csproj'
configuration: 'Release'
msbuildArguments: '/restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false /t: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 & Pack final build'
inputs:
solution: 'src/Plugin.PushNotification/Plugin.PushNotification.csproj'
configuration: 'Release'
msbuildArguments: '/restore /t:Build /p:ContinuousIntegrationBuild=true /p:Deterministic=false /t: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'