System.Graphics/azure-pipelines.yml

135 строки
4.1 KiB
YAML
Исходник Обычный вид История

variables:
2021-05-27 20:10:19 +03:00
BuildVersion: $[counter('release-counter', 1)]
IsRunningOnCI: true
DotNetVersion: 6.0.100-preview.4.21255.9
DotNet.Cli.Telemetry.OptOut: true
MauiCheck.Version: 0.4.1
MauiCheck.Manifest: https://raw.githubusercontent.com/Redth/dotnet-maui-check/main/manifests/maui-dev.manifest.json
2021-03-26 23:09:23 +03:00
parameters:
- name: BuildEverything
type: boolean
default: false
- name: BuildConfigurations
type: object
default:
- Debug
- Release
trigger:
2021-03-26 13:25:46 +03:00
branches:
include:
- main
tags:
include:
- '*'
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
pr:
branches:
include:
- main
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
2021-03-26 23:09:23 +03:00
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main # still defaults to master even though main is the main branch
2021-03-26 23:09:23 +03:00
stages:
- stage: windows
displayName: Build Windows
jobs:
- ${{ each BuildCondition in parameters.BuildConfigurations }}:
- job: win_hosted_${{ BuildCondition }}
workspace:
clean: all
displayName: Build Windows Phase (${{ BuildCondition }})
timeoutInMinutes: 60
pool:
vmImage: windows-latest
steps:
2021-05-27 20:45:48 +03:00
# - 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
2021-05-27 21:42:09 +03:00
2021-05-27 20:45:48 +03:00
# - powershell: |
# & dotnet tool update --global redth.net.maui.check --version $(MauiCheck.Version) --add-source https://api.nuget.org/v3/index.json
# & maui-check --ci --non-interactive --fix --skip androidsdk --skip xcode --skip vswin --skip vsmac --manifest $(MauiCheck.Manifest)
# displayName: maui-check
# errorActionPreference: stop
2021-05-27 18:48:44 +03:00
2021-05-27 20:45:48 +03:00
- script: dotnet tool restore
displayName: install dotnet tools
2021-05-27 19:53:42 +03:00
2021-05-28 11:36:19 +03:00
- script: dotnet vs update --quiet
displayName: install vs preview
2021-05-27 19:53:42 +03:00
2021-05-27 21:42:09 +03:00
- script: dotnet cake --configuration=${{ BuildCondition }}
2021-05-26 21:14:15 +03:00
displayName: pack nugets
2021-05-19 21:36:29 +03:00
2021-03-27 02:32:40 +03:00
- task: CopyFiles@2
2021-05-28 11:46:56 +03:00
displayName: 'Copy SignList.xml and Packages'
2021-03-27 02:32:40 +03:00
inputs:
2021-05-28 11:46:56 +03:00
Contents: |
**/Microsoft.Maui.*.nupkg
**/Microsoft.Maui.*.snupkg
**/SignList.xml
2021-03-27 02:32:40 +03:00
TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ BuildCondition }}'
flattenFolders: true
2021-03-18 20:38:53 +03:00
2021-03-26 23:09:23 +03:00
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: nuget
2021-03-18 20:38:53 +03:00
2021-03-26 23:09:23 +03:00
# only sign using the private server
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: nuget_signing
2021-03-26 23:11:31 +03:00
dependsOn: windows
2021-03-26 23:09:23 +03:00
displayName: Sign Nuget
jobs:
- template: sign-artifacts/jobs/v2.yml@xamarin-templates
parameters:
teamName: Maui
usePipelineArtifactTasks: false
targetFolder: $(Build.ArtifactStagingDirectory)/nuget/signed
2021-03-27 01:49:56 +03:00
artifactPath: release
2021-03-26 23:09:23 +03:00
signedArtifactName: nuget
signedArtifactPath: signed
displayName: Sign Phase
condition: and(succeeded(), or(eq(variables['Sign'], 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'],'refs/tags/'))))