-
Notifications
You must be signed in to change notification settings - Fork 5
/
ci-blazor-ui-pipline.yml
67 lines (58 loc) · 1.8 KB
/
ci-blazor-ui-pipline.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
trigger:
- main
variables:
buildConfiguration: 'Release'
deployment_token: '79c0c85d71d89daa8d3841f2ebaf955849a1161f155d5e3121d218aaf48b18d70-b174618f-1e57-435c-a722-3303e3810c1f00344502'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/src/DeveloperPath.WebUI/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: Bash@3
displayName: 'Build info json'
inputs:
targetType: 'inline'
script: 'echo -e -n "{\"buildNumber\":\"$(Build.BuildNumber)\",\"buildId\":\"$(Build.BuildId)\",\"branchName\":\"$(Build.SourceBranchName)\",\"commitHash\":\"$(Build.SourceVersion)\"}" > "$(Build.SourcesDirectory)/src/DeveloperPath.WebUI/wwwroot/buildinfo.json"'
- task: DotNetCoreCLI@2
displayName: 'Publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/src/DeveloperPath.WebUI/DeveloperPath.WebUI.csproj'
arguments: '--configuration $(BuildConfiguration) --output data'
zipAfterPublish: true
- task: PowerShell@2
inputs:
targetType: 'inline'
script:
ls -R
errorActionPreference: 'continue'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '**/data/DeveloperPath.WebUI.zip'
destinationFolder: 'PublishData'
cleanDestinationFolder: true
overwriteExistingFiles: false
- task: PowerShell@2
inputs:
targetType: 'inline'
script:
ls -R
errorActionPreference: 'continue'
- task: AzureStaticWebApp@0
inputs:
app_location: 'PublishData/wwwroot'
api_location: 'api'
output_location: "wwwroot"
env:
azure_static_web_apps_api_token: $(deployment_token)
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'