-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
46 lines (42 loc) · 1.4 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
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Release'
myproject: 'BlazorMovies/Server/BlazorMovies.Server.csproj'
steps:
- task: NuGetToolInstaller@1
displayName: 'Install NuGet 4.9.1'
inputs:
versionSpec: '4.9.1'
checkLatest: true
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.x'
- script: dotnet build $(myproject) --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: CmdLine@2
displayName: 'Installing EF Core CLI tools'
inputs:
script: 'dotnet tool install --global dotnet-ef'
- task: CmdLine@2
displayName: 'Generating DB script'
inputs:
script: 'dotnet ef migrations script -i -o $(Build.ArtifactStagingDirectory)\migrate.sql --project $(myproject)'
- task: DotNetCoreCLI@2
displayName: 'Publishing App...'
inputs:
command: 'publish'
publishWebProjects: false
projects: $(myproject)
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory) --self-contained --runtime win-x86'
zipAfterPublish: false
modifyOutputPath: false
- task: PublishBuildArtifacts@1
displayName: 'Publishing Build Artifacts...'