-
Notifications
You must be signed in to change notification settings - Fork 2
/
.azure-pipelines.yml
110 lines (93 loc) · 3.7 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
trigger:
branches:
include:
- master
- release/beta/*
- release/stable/*
pr:
branches:
include:
- master
- release/beta/*
- release/stable/*
variables:
DotNet.Cli.Telemetry.OptOut: true
jobs:
- job: Packages
pool:
vmImage: 'windows-2022'
workspace:
clean: all
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
strategy:
matrix:
OSLog:
ProjectToBuild: '$(build.sourcesdirectory)/src/Uno.Extensions.Logging.OSLog/Uno.Extensions.Logging.OSLog.csproj'
DotNetVersion: 6.0.300
UnoCheck.Version: '1.3.1'
UnoCheck.Manifest: https://raw.githubusercontent.com/unoplatform/uno.check/8c7f669060a6cca50f71bb0845281c424ad7eb0d/manifests/uno.ui-preview.manifest.json
WebAssembly:
ProjectToBuild: '$(build.sourcesdirectory)/src/Uno.Extensions.Logging.WebAssembly.Console/Uno.Extensions.Logging.WebAssembly.Console.csproj'
DotNetVersion: 7.0.102
UnoCheck.Version: '1.11.0-dev.2'
UnoCheck.Manifest: https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json
steps:
- checkout: self
clean: true
- task: gitversion/setup@0
inputs:
versionSpec: '5.x'
- task: gitversion/execute@0
inputs:
updateAssemblyInfo: 'False'
useConfigFile: true
configFilePath: GitVersion.yml
displayName: Use GitVersion
## Required until .NET 6 installs properly on Windows using UseDotnet
- powershell: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Version $(DotNetVersion) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
& dotnet --list-sdks
displayName: Install .NET $(DotNetVersion)
errorActionPreference: stop
- powershell: |
& dotnet tool update --global uno.check --version $(UnoCheck.Version) --add-source https://api.nuget.org/v3/index.json
& uno-check --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip vswin --skip vsmac --manifest $(UnoCheck.Manifest)
displayName: Install .NET Workloads
errorActionPreference: continue
ignoreLASTEXITCODE: true
- powershell: |
rm src/global.json
mv src/global.net6.json src/global.json
displayName: Replace global.json
condition: eq(variables['DotNetVersion'], '6.0.300')
- task: MSBuild@1
displayName: Build Package
inputs:
solution: $(ProjectToBuild)
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /bl:$(build.artifactstagingdirectory)\msbuild.binlog "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=$(GITVERSION.FullSemVer)" "/p:InformationalVersion=$(GITVERSION.InformationalVersion)" /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
SignPackageName: "Uno.Extensions.Logging"
SignPackageDescription: "Uno.Extensions.Logging"
ArtifactDirectory: $(build.artifactstagingdirectory)
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
- task: PublishBuildArtifacts@1
condition: always()
inputs:
ArtifactName: $(Build.DefinitionName)