-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
35 lines (30 loc) · 1.03 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
trigger:
- main
pr:
- main
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'Build $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Stage artifacts'
inputs:
command: publish
publishWebProjects: false
arguments: './Server/Elle.Server.csproj --configuration Release --runtime linux-x64 --self-contained --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: true
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
ArtifactName: 'elle-$(Build.BuildNumber)'
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
publishLocation: 'Container'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'azureConnection'
WebAppName: $(WebAppName)
packageForLinux: '$(Build.ArtifactStagingDirectory)/*.zip'