Uno.Themes/azure-pipelines.yml

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

trigger:
2020-05-04 17:26:07 +03:00
branches:
include:
- master
- release/beta/*
- release/stable/*
- feature/*
pr:
branches:
include:
- master
- release/beta/*
- release/stable/*
variables:
2020-07-03 02:44:43 +03:00
# Pool names
windowsPoolName: 'windows 1809'
macOSPoolName: 'Default'
2020-05-20 01:09:16 +03:00
# Nuget Version to use
2020-05-04 17:26:07 +03:00
NUGET_VERSION: 5.4.0
2020-05-20 01:09:16 +03:00
# Solution to build
2020-05-04 17:26:07 +03:00
SolutionFileName: Uno.Material.sln
2020-05-20 01:09:16 +03:00
# name of the folder where artefacts will be placed. Variable used in build and release phases.
# We make seperate folders so that releases can each download only the folder they need.
2020-05-04 17:26:07 +03:00
NugetPackagesArtifactName: Packages
2020-05-20 01:09:16 +03:00
AndroidArtifactName: Android
iOSArtifactName: iOS
UWPArtifactName: UWP
2020-06-25 20:42:59 +03:00
macOSArtifactName: macOS
2020-05-20 01:09:16 +03:00
# Path where packages (nuget or app packages) will be copied to.
PackageOutputPath: $(Build.ArtifactStagingDirectory)
# For Application.Building.Light optimizations
IsLightBuild: $[eq(variables['Build.Reason'], 'PullRequest')]
# For release conditions
IsReleaseBranch: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))]
2020-05-20 01:09:16 +03:00
# Android configurations
2020-05-04 17:26:07 +03:00
ANDROID_NDK_HOME: C:\Microsoft\AndroidNDK64\android-ndk-r16b
ANDROID_NDK_PATH: C:\Microsoft\AndroidNDK64\android-ndk-r16b
AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r16b
2020-05-20 01:09:16 +03:00
# Optional, specifiy xcode and xamarin versions. See ios-build-select-version.yml if needed.
# xCodeRoot: '/Applications/Xcode_11.3.app'
# XamarinSDKVersion: 6_6_0
# Configuration requirements on the azure devops pipeline
# Those variables must be configured in the AzureDevops Library
#### iOS ####
## Secure files:
# distribution certificate (.p12)
# distribution provisioning profile (.mobileprovision)
## Variable group containing : "group: apple.appstore.distribution"
# $(appleappstorecertificatepassword) : password for the p12 certificate (this is marked private in azdo)
# $(UnoMaterialStoreProvisioningProfileName) : Name of the .mobileprovision file in the secure files.
# $(appleTeamId) : id of the apple team (Required if the secure connection used has access to more than one team, which is often the case)
# $(appleTeamName) : name of the apple developer team. (Required if the secure connection used has access to more than one team, which is often the case)
## Code to update below
# In InstallAppleCertificate@ task: Set the value for certSecureFile
# In InstallAppleProvisioningProfile@ task: Set the value for provProfileSecureFile
# In stage-release-testflight.yml, AppStoreRelease : Set the name of the service connection and the identifier of the app (aka the Bundle ID)
2020-05-04 17:26:07 +03:00
stages:
- stage: Build
jobs:
- job: Build_on_Windows # Build samples possible on a windows machine and nuget packages
2020-05-04 17:26:07 +03:00
strategy:
maxParallel: 3
matrix:
Android:
ApplicationConfiguration: Release
ApplicationPlatform: Android
2020-05-20 01:09:16 +03:00
ArtifactName: $(AndroidArtifactName)
2020-05-04 17:26:07 +03:00
UWP:
ApplicationConfiguration: Release
ApplicationPlatform: UWP_x64
2020-05-20 01:09:16 +03:00
ArtifactName: $(UWPArtifactName)
2020-05-04 17:26:07 +03:00
Packages:
ApplicationConfiguration: Release
ApplicationPlatform: Packages
GeneratePackageOnBuild: true
ArtifactName: $(NugetPackagesArtifactName)
pool:
2020-07-03 02:44:43 +03:00
name: $(windowsPoolName)
container: nventive/build-agent:vs16.6.0
2020-05-04 17:26:07 +03:00
steps:
- template: build/stage-build.yml
2020-06-25 20:42:59 +03:00
- job: Build_on_Mac # Build iOS and macOS samples
strategy:
maxParallel: 3
matrix:
iOS:
ApplicationConfiguration: Release
ApplicationPlatform: iPhone
2020-05-20 01:09:16 +03:00
ArtifactName: $(iOSArtifactName)
2020-06-25 20:42:59 +03:00
macOS:
ApplicationConfiguration: Release
2020-07-23 22:30:22 +03:00
ApplicationPlatform: macOS
2020-06-25 20:42:59 +03:00
ArtifactName: $(macOSArtifactName)
pool:
2020-07-03 02:44:43 +03:00
name: $(macOSPoolName)
demands:
- Xamarin.iOS -equals 13.16
variables:
2020-05-20 01:09:16 +03:00
- name: SkipUnknownFrameworks
value: true # Used by TargetFrameworks.Filtering package to build only what's possible on a mac for the multitargeted library
2020-07-23 22:30:22 +03:00
- group: apple.appstore.distribution # Import all variables for certificate from the library in azure devops
steps:
- task: InstallAppleCertificate@2
displayName: Install Apple Certificate
inputs:
2020-07-23 22:30:22 +03:00
certSecureFile: 'apple.appstore.distribution.p12' # Name of the p12 certificate in the secure files (in azure devops library)
2020-05-20 01:09:16 +03:00
certPwd: '$(appleappstorecertificatepassword)'
keychain: 'temp'
deleteCert: true
- task: InstallAppleProvisioningProfile@1
displayName: 'Install Apple Provisioning Profile'
inputs:
provisioningProfileLocation: 'secureFiles'
2020-05-20 01:09:16 +03:00
provProfileSecureFile: 'UnoMaterial.mobileprovision' # Name of the .mobileprovision file in the secure files.
2020-07-03 02:44:43 +03:00
- task: UseDotNet@2
displayName: 'Install .Net Core runtime 2.1.x'
2020-07-03 02:44:43 +03:00
inputs:
version: 2.1.x
2020-07-03 02:44:43 +03:00
packageType: 'runtime'
installationPath: '$(Agent.ToolsDirectory)/dotnet'
- template: build/stage-build.yml
2020-07-23 22:30:22 +03:00
- stage: Release_Nuget
# Only release when the build is not a Pull Request and it's using one of the proper release branches
condition: and(succeeded(), ne(variables['IsLightBuild'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
2020-07-23 22:30:22 +03:00
dependsOn: Build
2020-05-20 01:09:16 +03:00
2020-07-23 22:30:22 +03:00
jobs:
- template: build/stage-release-nuget.yml
2020-07-16 00:21:41 +03:00
- stage: Release_AppCenter
# Only release when the build is not a Pull Request and it's using one of the proper release branches
condition: and(succeeded(), ne(variables['IsLightBuild'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
2020-07-23 22:30:22 +03:00
dependsOn: Build
2020-07-16 00:21:41 +03:00
jobs:
- template: build/stage-release-appcenter.yml
2020-07-23 22:30:22 +03:00
- stage: Release_TestFlight
# Only release when the build is not a Pull Request and it's using one of the proper release branches
condition: and(succeeded(), ne(variables['IsLightBuild'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
dependsOn: Build
jobs:
- template: build/stage-release-testflight.yml