-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
94 lines (85 loc) · 2.33 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- README.md
- .editorconfig
- .gitignore
pr:
branches:
include:
- master
paths:
exclude:
- README.md
- .editorconfig
- .gitignore
name: $(Build.BuildId)
variables:
- name: BuildConfiguration
value: Release
stages:
- stage: build
displayName: Build NuGet Packages
jobs:
- job: buildJob
displayName: Build Module
pool:
vmImage: macOS-10.14
demands:
- MSBuild
- Xamarin.Android
- JDK
- AndroidSDK
steps:
# - powershell: |
# Write-Host "Downloading nuget.exe"
# Invoke-WebRequest -Uri 'https://dist.nuget.org/win-x86-commandline/v5.1.0/nuget.exe' -OutFile 'nuget.exe'
# Write-Host "Clearing local cache"
# ./nuget.exe locals all -clear
# Write-Host "Restoring NuGet packages"
# ./nuget.exe restore ./src/ExhibitorModule/ExhibitorModule.csproj
# displayName: NuGet Restore
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.0.2'
checkLatest: true
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
noCache: true
- task: MSBuild@1
displayName: Build Projects
inputs:
solution: 'src/ExhibitorModule//ExhibitorModule.csproj'
configuration: $(BuildConfiguration)
msbuildArguments: '/p:DebugType=portable /p:JavaSdkDirectory="$(JAVA_HOME)"'
- task: PublishPipelineArtifact@0
displayName: Publish Artifacts
inputs:
artifactName: NuGet
targetPath: $(Build.ArtifactStagingDirectory)
- stage: deploy
displayName: Deploy NuGets
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- deployment: NuGet
displayName: NuGet.org
environment: NuGet
condition: and(succeeded(), or(eq(variables['IS_PREVIEW'], true), eq(variables['IS_RELEASE'], true)))
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
displayName: NuGet Push
inputs:
command: push
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.symbols.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'NuGet'