-
Notifications
You must be signed in to change notification settings - Fork 32
/
cd-pipeline.yml
64 lines (52 loc) · 2.46 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
61
62
63
64
variables:
MONO_VERSION: 6_12_12
NETCORE_VERSION: '3.0.x'
XCODE_VERSION: 13.2
# set the version numbering, this results in 1.0.1 for the first build incrementing that way.
name: 4.2$(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-11
# 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
- bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer
displayName: Switch to the latest Xcode
- 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.FacebookClient/Plugin.FacebookClient.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.FacebookClient/Plugin.FacebookClient.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'