Uno.PackageDiff/.vsts-ci.yml

132 строки
3.1 KiB
YAML

jobs:
- job: Windows
pool:
vmImage: windows-2022
variables:
NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 5.0.x'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 5.0.x
- task: UseDotNet@2
displayName: 'Use .NET SDK 7.0.203'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 7.0.203
- task: gitversion/setup@0
retryCountOnTaskFailure: 3
inputs:
versionSpec: '5.6.8'
- task: gitversion/execute@0
retryCountOnTaskFailure: 3
inputs:
updateAssemblyInfo: 'False'
useConfigFile: true
configFilePath: gitversion.yml
displayName: Use GitVersion
- task: DotNetCoreCLI@2
displayName: .NET Core Build
inputs:
command: build
arguments: -c Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "-p:PackageVersion=$(GITVERSION.FullSemVer)" "/p:InformationalVersion=$(GITVERSION.InformationalVersion)" /detailedsummary
workingDirectory: $(build.sourcesdirectory)\src
- task: VSTest@2
inputs:
testAssemblyVer2: |
**\*tests.dll
!**\obj\**
vstestLocationMethod: version
vsTestVersion: latest
testSelector: testAssemblies
- task: DotNetCoreInstaller@0
inputs:
version: '2.1.504'
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
SignPackageName: "Uno.PackageDiff"
SignPackageDescription: "Uno.PackageDiff"
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:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: unosourcegenerator-drop
ArtifactType: Container
- job: Linux
workspace:
clean: all
pool:
vmImage: 'ubuntu-latest'
variables:
NUGET_PACKAGES: $(Agent.WorkFolder)/.nuget
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.203'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 7.0.203
- task: DotNetCoreCLI@2
displayName: .NET Core Build
inputs:
command: build
arguments: --configuration Release /detailedsummary
workingDirectory: $(build.sourcesdirectory)/src
- job: macOS
pool:
vmImage: 'macOS-latest'
variables:
NUGET_PACKAGES: $(Agent.WorkFolder)/.nuget
SourceLinkEnabled: false
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.203'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 7.0.203
- task: DotNetCoreCLI@2
displayName: .NET Core Build
inputs:
command: build
arguments: --configuration Release /detailedsummary
workingDirectory: $(build.sourcesdirectory)/src