forked from plantanapp/PlantAnApp.PdfAutoSigner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-installers.yml
119 lines (103 loc) · 3.75 KB
/
azure-pipelines-installers.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger: none
jobs:
- job: WindowsInstallers
displayName: Creates the Windows 32 bit and 64 bit installers
pool:
vmImage: 'windows-latest'
variables:
solution: './PdfAutoSigner.sln'
winInstallerProject: './PdfAutoSigner.LocalApi.Installer/PdfAutoSigner.LocalApi.Installer.wixproj'
buildConfiguration: 'Release'
strategy:
matrix:
x86:
buildPlatform: 'x86'
x64:
buildPlatform: 'x64'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(winInstallerProject)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
clean: true
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*[Tt]ests/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/PdfAutoSigner.LocalApi.Installer/bin/$(buildConfiguration)'
Contents: '**\*.msi'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: 'PdfAutoSigner-$(buildConfiguration)-win-$(buildPlatform)'
publishLocation: 'pipeline'
- job: MacOSPackage
displayName: Creates the MacOS 64 bit installer
pool:
vmImage: 'macOS-latest'
variables:
solution: './PdfAutoSigner.sln'
buildProject: './PdfAutoSigner.LocalApi/PdfAutoSigner.LocalApi.csproj'
buildConfiguration: 'Release'
buildPlatform: 'x64'
steps:
- task: UseDotNet@2
displayName: Install .NET Core 6
inputs:
packageType: 'sdk'
version: '6.0.300'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(buildProject)'
- task: DotNetCoreCLI@2
displayName: 'Build project'
inputs:
command: 'publish'
projects: '$(buildProject)'
arguments: '-c $(buildConfiguration) -r osx-$(buildPlatform) --self-contained -p:PublishSingleFile=true'
zipAfterPublish: false
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*[Tt]ests/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy the publish folder'
inputs:
sourceFolder: '$(Build.SourcesDirectory)/PdfAutoSigner.LocalApi/bin/$(buildConfiguration)'
Contents: '**/publish/*'
targetFolder: '$(Build.SourcesDirectory)/osx_package/publish'
CleanTargetFolder: true
OverWrite: true
flattenFolders: true
- task: ShellScript@2
displayName: 'Build osx package'
inputs:
scriptPath: '$(Build.SourcesDirectory)/osx_package/build.sh'
- task: CopyFiles@2
displayName: 'Copy the osx package to the staging directory'
inputs:
sourceFolder: '$(Build.SourcesDirectory)/osx_package'
Contents: '**/PdfAutoSigner.pkg'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: 'PdfAutoSigner-$(buildConfiguration)-osx-$(buildPlatform)'
publishLocation: 'pipeline'