-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
94 lines (85 loc) · 3.41 KB
/
azure-pipelines.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: 'Hood.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$file = ".\projects\Hood.Development\package.json"
$json = Get-Content $file | ConvertFrom-Json
$version = "$($json.version)"
Write-Host "##vso[task.setvariable variable=version;]$version"
$exec = "dotnet restore"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.Core\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.Core.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.UI\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.UI.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.UI.Core\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.UI.Bootstrap3\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood.UI.Bootstrap4\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet build .\projects\Hood\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.Core\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.Core.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.UI\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.UI.Admin\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.UI.Core\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.UI.Bootstrap3\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood.UI.Bootstrap4\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
$exec = "dotnet pack .\projects\Hood\ -c Release /p:Version=$version"
Write-Host "$exec"
Invoke-Expression $exec
name: BuildAndPack
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '**/*.nupkg;!**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'MyGet'