58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
# ASP.NET Core
|
|
|
|
name: 'FileOperations.$(Build.SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)'
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- '*'
|
|
|
|
pool:
|
|
name: LCUOnPrem
|
|
demands:
|
|
- msbuild
|
|
- visualstudio
|
|
- vstest
|
|
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'restore'
|
|
feedsToUse: 'select'
|
|
vstsFeed: '58ebbac4-8e98-4281-bb3f-58003852f4a7'
|
|
|
|
- script: dotnet build --configuration $(buildConfiguration)
|
|
displayName: 'dotnet build $(buildConfiguration)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: Test
|
|
inputs:
|
|
command: test
|
|
projects: '**/*Tests.csproj'
|
|
arguments: '--configuration $(BuildConfiguration) --collect "Code coverage"'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'dotnet publish $(buildConfiguration)'
|
|
inputs:
|
|
command: publish
|
|
publishWebProjects: false
|
|
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory) --framework net8.0'
|
|
zipAfterPublish: true
|
|
|
|
- task: NuGetCommand@2
|
|
condition: and (succeeded(), eq(variables['Build.SourceBranchName'], 'master') )
|
|
displayName: 'NuGet push'
|
|
inputs:
|
|
command: push
|
|
packagesToPush: 'LCU.Library.Internal.FileOperationsModels/**/*.nupkg'
|
|
publishVstsFeed: '58ebbac4-8e98-4281-bb3f-58003852f4a7'
|
|
allowPackageConflicts: true
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
condition: and (succeeded(), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], 'master')) )
|
|
displayName: 'Publish Artifact: dist'
|
|
inputs:
|
|
PathtoPublish: '$(build.artifactstagingdirectory)'
|
|
ArtifactName: 'dist' |