-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.yml
More file actions
46 lines (39 loc) · 1.32 KB
/
build.yml
File metadata and controls
46 lines (39 loc) · 1.32 KB
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:
branches:
include:
- master
paths:
include:
- website
pool:
vmImage: ubuntu-latest
variables:
buildConfiguration: "Release"
steps:
- task: UseDotNet@2
inputs:
packageType: "sdk"
version: "8.0.100"
- script: dotnet build --configuration $(buildConfiguration)
workingDirectory: website/src/LinkDotNet.Blog.Web
displayName: "dotnet build $(buildConfiguration)"
- script: dotnet publish -c $(buildConfiguration) --self-contained true -r win-x86
workingDirectory: website/src/LinkDotNet.Blog.Web
displayName: "dotnet build $(buildConfiguration)"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: "website/src/LinkDotNet.Blog.Web/bin/Release/net8.0/win-x86/publish"
includeRootFolder: false
archiveType: zip
archiveFile: "$(Build.ArtifactStagingDirectory)/blog/$(Build.BuildId).zip"
replaceExistingArchive: true
displayName: "backend zip files"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: "$(Build.ArtifactStagingDirectory)/blog"
ArtifactName: "blog"
displayName: "blog publish to pipeline"