-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipeline-ci.yml
61 lines (51 loc) · 1.55 KB
/
azure-pipeline-ci.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
# Set the branch
trigger:
- dotnet8
pool:
# vmImage: 'Release-Pool'
name: 'Default'
variables:
buildConfiguration: 'Release'
nugetFeedUrl: 'https://www.nuget.org/packages/DevInstance.BlazorToolkit/' # For internal feeds
# nugetApiKey: $(NuGetApiKey) # Store this in pipeline secrets
steps:
# Step 1: Restore NuGet Packages
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.8'
inputs:
versionSpec: 5.8
- task: UseDotNet@2
displayName: 'Use .NET 8.x'
inputs:
version: 8.x
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
# Step 2: Build the Solution
- task: VSBuild@1
inputs:
solution: '**/DevInstance.BlazorToolkit.csproj' # solution: '**/*.sln'
msbuildArgs: '/p:Configuration=$(buildConfiguration)'
- task: VSBuild@1
inputs:
solution: '**/EmployeeList.Client.csproj'
msbuildArgs: '/p:Configuration=$(buildConfiguration)'
- task: VSBuild@1
inputs:
solution: '**/EmployeeList.csproj'
msbuildArgs: '/p:Configuration=$(buildConfiguration)'
# Step 3: Pack NuGet Package
#- task: NuGetCommand@2
# inputs:
# command: 'pack'
# packagesToPack: '**/DevInstance.BlazorToolkit.csproj' # Or .nuspec if applicable
# configuration: $(buildConfiguration)
# Step 4: Push NuGet Package
#- task: NuGetCommand@2
# inputs:
# command: 'push'
# packagesToPush: '**/*.nupkg'
# nuGetFeedType: 'external'
# publishFeedCredentials: 'NugetCon' # Reference the correct service connection name
# feedPublishUrl: 'https://api.nuget.org/v3/index.json' # Update for your feed