-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
49 lines (43 loc) · 1.44 KB
/
azure-pipelines.yml
File metadata and controls
49 lines (43 loc) · 1.44 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
47
48
49
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- main
- develop
pool:
vmImage: ubuntu-latest
variables:
buildConfiguration: 'Release'
dotNetFramework: 'net7.0'
dotNetVersion: '7.0.x'
targetRuntime: 'linux-x64'
# Build the app for .NET 7 framework
steps:
- task: DownloadSecureFile@1
inputs:
secureFile: 'client_secret.json'
- task: CopyFiles@2
inputs:
SourceFolder: $(Agent.TempDirectory)
Contents: 'client_secret.json'
TargetFolder: $(Build.SourcesDirectory)
- task: UseDotNet@2
inputs:
version: $(dotNetVersion)
includePreviewVersions: true
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'Build .NET 7 Application'
# Publish it as .NET 7 self-contained application for linux runtime
- task: DotNetCoreCLI@2
inputs:
command: publish
publishWebProjects: true
arguments: '--configuration $(BuildConfiguration) --framework $(dotNetFramework) --runtime $(targetRuntime) --self-contained --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: true
modifyOutputPath: false
# Package the file and uploads them as an artifact of the build
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'rgo-server'