-
Notifications
You must be signed in to change notification settings - Fork 11
/
cloudbuild.yaml
52 lines (49 loc) · 2.27 KB
/
cloudbuild.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
# outline the steps to build a .NET project, pack it as Nuget package and push it to Nuget source feed
steps:
# Build the projects
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Build for .NET
entrypoint: 'dotnet'
args: ['build', '-c', 'Release', 'src/Mscc.GenerativeAI/Mscc.GenerativeAI.csproj']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Build for ASP.NET Core
entrypoint: 'dotnet'
args: ['build', '-c', 'Release', 'src/Mscc.GenerativeAI.Web/Mscc.GenerativeAI.Web.csproj']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Build for .NET using Google Cloud Client Library
entrypoint: 'dotnet'
args: ['build', '-c', 'Release', 'src/Mscc.GenerativeAI.Google/Mscc.GenerativeAI.Google.csproj']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Build for Microsoft.Extension.AI and Microsoft Semantic Kernel
entrypoint: 'dotnet'
args: ['build', '-c', 'Release', 'src/Mscc.GenerativeAI.Microsoft/Mscc.GenerativeAI.Microsoft.csproj']
# Pack the NuGet packages
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Pack for .NET
entrypoint: 'dotnet'
args: ['pack', '-c', 'Release', 'src/Mscc.GenerativeAI/Mscc.GenerativeAI.csproj', '-o', 'output/']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Pack for ASP.NET Core
entrypoint: 'dotnet'
args: ['pack', '-c', 'Release', 'src/Mscc.GenerativeAI.Web/Mscc.GenerativeAI.Web.csproj', '-o', 'output/']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Pack for .NET using Google Cloud Client Library
entrypoint: 'dotnet'
args: ['pack', '-c', 'Release', 'src/Mscc.GenerativeAI.Google/Mscc.GenerativeAI.Google.csproj', '-o', 'output/']
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Pack for Microsoft.Extension.AI and Microsoft Semantic Kernel
entrypoint: 'dotnet'
args: ['pack', '-c', 'Release', 'src/Mscc.GenerativeAI.Microsoft/Mscc.GenerativeAI.Microsoft.csproj', '-o', 'output/']
# Push the packages to NuGet source feed
- name: 'mcr.microsoft.com/dotnet/sdk:9.0'
id: Push
entrypoint: 'dotnet'
args: ['nuget', 'push', 'output/*.nupkg', '--skip-duplicate', '-s', 'https://api.nuget.org/v3/index.json', '-k', '${_NUGET_API_KEY}']
options:
substitutionOption: 'ALLOW_LOOSE'
env:
- 'DOTNET_NOLOGO=true'
- 'DOTNET_CLI_TELEMETRY_OPTOUT=true'
- 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true'
substitutions:
_NUGET_API_KEY: YOUR_NUGET_API_KEY