-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
69 lines (66 loc) · 3.06 KB
/
cloudbuild.yaml
File metadata and controls
69 lines (66 loc) · 3.06 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# outline the steps to build a .NET project, pack it as Nuget package and push it to Nuget source feed
steps:
# Build, Pack, and Push the Main Package
- name: 'mcr.microsoft.com/dotnet/sdk:10.0'
id: Build Main
entrypoint: 'dotnet'
args: ['build', '-c', 'Release', 'src/Mscc.GenerativeAI/Mscc.GenerativeAI.csproj']
- name: 'mcr.microsoft.com/dotnet/sdk:10.0'
id: Pack Main
entrypoint: 'dotnet'
args: ['pack', '-c', 'Release', 'src/Mscc.GenerativeAI/Mscc.GenerativeAI.csproj', '-o', 'output/']
- name: 'mcr.microsoft.com/dotnet/sdk:10.0'
id: Push Main
entrypoint: 'dotnet'
args: ['nuget', 'push', 'output/Mscc.GenerativeAI.*.nupkg', '--skip-duplicate', '-s', 'https://api.nuget.org/v3/index.json', '-k', '${_NUGET_API_KEY}']
# Wait for NuGet package to be available
- name: 'ubuntu'
id: Wait for NuGet
entrypoint: 'sleep'
args: ['300']
# Restore, Build, Pack, and Push Dependent Packages
- name: 'mcr.microsoft.com/dotnet/sdk:10.0'
id: Restore Dependents
entrypoint: 'dotnet'
args: ['restore', 'GenerativeAI.sln']
- name: 'mcr.microsoft.com/dotnet/sdk:10.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:10.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:10.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']
- name: 'mcr.microsoft.com/dotnet/sdk:10.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/']
- name: 'mcr.microsoft.com/dotnet/sdk:10.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:10.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:10.0'
id: Push Dependents
entrypoint: 'bash'
args:
- -c
- |
dotnet nuget push 'output/Mscc.GenerativeAI.Web.*.nupkg' --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${_NUGET_API_KEY}
dotnet nuget push 'output/Mscc.GenerativeAI.Google.*.nupkg' --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${_NUGET_API_KEY}
dotnet nuget push 'output/Mscc.GenerativeAI.Microsoft.*.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