-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.publish.yaml
84 lines (73 loc) · 2.13 KB
/
pipeline.publish.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
trigger:
- release
pool:
vmImage: 'windows-2019'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'ci'
workingDir: 'src\BlazingRoller\Client\jslib'
- task: Npm@1
displayName: 'npm build'
inputs:
command: 'custom'
workingDir: 'src\BlazingRoller\Client\jslib'
customCommand: 'run build-prod'
- task: PowerShell@2
displayName: 'Copy Unity artifacts to wwwroot'
inputs:
targetType: 'inline'
script: 'Copy-Item "src\Unity\Baked\*" -Destination "src\BlazingRoller\Server\wwwroot" -recurse'
failOnStderr: true
- task: UseDotNet@2
displayName: 'Use .NET Core 3.x SDK'
inputs:
packageType: 'sdk'
version: '3.x'
- task: DotNetCoreCLI@2
displayName: 'Restore nuget packages'
inputs:
command: 'restore'
projects: 'src\BlazingRoller\Server\BlazingRoller.Server.csproj'
feedsToUse: 'select'
- task: PowerShell@2
displayName: 'Update assembly version'
inputs:
targetType: inline
workingDirectory: 'src/BlazingRoller'
script: |
$id = $(Build.BuildId)
(Get-Content -raw AssemblyInfo.cs) -replace "(\d+\.\d+\.\d+)\.\d+", ('$1.' + $id) | Out-File AssemblyInfo.cs
- task: DotNetCoreCLI@2
displayName: 'Publish application'
inputs:
command: 'publish'
projects: 'src\BlazingRoller\Server\BlazingRoller.Server.csproj'
arguments: '-c Release -r win-x64 -o .\publish'
zipAfterPublish: false
modifyOutputPath: false
- task: ArchiveFiles@2
displayName: 'Archive artifact'
inputs:
rootFolderOrFile: '.\publish'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '.\publish\artifact.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact'
inputs:
PathtoPublish: '.\publish\artifact.zip'
ArtifactName: 'artifact'
publishLocation: 'Container'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy to Azure'
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'Personal ERNI Subscription'
appType: 'webApp'
WebAppName: 'blazing-roller'
packageForLinux: '.\publish\artifact.zip'
enableCustomDeployment: true
DeploymentType: 'zipDeploy'