-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathazure-pipelines.yml
165 lines (147 loc) · 4.84 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
trigger:
- master
- develop
- release/*
pr:
- master
- develop
- release/*
variables:
buildConfiguration: "Release"
stages:
- stage: buildStage
displayName: Build
jobs:
- job: lintLibrary
displayName: Lint
pool:
vmImage: "windows-latest"
steps:
- task: Npm@1
displayName: "Installing NPM Packages"
inputs:
command: install
- task: Npm@1
displayName: "Linting"
inputs:
command: custom
customCommand: run lint
- task: Npm@1
displayName: "Checking Prettier"
inputs:
command: custom
customCommand: run prettier:check
- task: Npm@1
displayName: "Checking Types"
inputs:
command: custom
customCommand: run build:tsc
- job: buildLibrary
displayName: Build
dependsOn:
pool:
vmImage: "windows-latest"
steps:
- task: PowerShell@2
displayName: "Setting build number"
inputs:
filePath: "./versioning.ps1"
- task: Npm@1
displayName: "Installing NPM Packages"
inputs:
command: "install"
- task: Npm@1
displayName: "Building JS and CSS"
inputs:
command: custom
customCommand: "run build"
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: 'sdk'
version: '8.0.x'
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: "Restoring Nuget Packages"
inputs:
command: "restore"
projects: "**/*.csproj"
feedsToUse: "select"
verbosityRestore: "Normal"
- task: DotNetCoreCLI@2
displayName: "Building"
inputs:
command: "build"
projects: "**/*.csproj"
arguments: "-c $(buildConfiguration)"
- task: DotNetCoreCLI@2
displayName: "Packing"
inputs:
command: "pack"
packagesToPack: "**/*.csproj"
versioningScheme: "byBuildNumber"
verbosityPack: "Normal"
- publish: $(Build.ArtifactStagingDirectory)
artifact: NuGetPackage
- publish: CHANGELOG.md
artifact: Changelog
- stage: deployStage
displayName: Deploy
dependsOn: buildStage
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'IndividualCI'))
jobs:
- deployment: githubRelease
displayName: Create Github Release
pool:
vmImage: "windows-latest"
environment: currietechnologies-prod
strategy:
runOnce:
deploy:
steps:
- task: GitHubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: "github connection 1"
repositoryName: "$(Build.Repository.Name)"
action: "create"
target: "$(Build.SourceVersion)"
tagSource: "userSpecifiedTag"
tag: "v$(Build.BuildNumber)"
title: "v$(Build.BuildNumber)"
releaseNotesFilePath: "$(Pipeline.Workspace)/Changelog/CHANGELOG.md"
assets: "$(Pipeline.Workspace)/NuGetPackage/*.nupkg"
addChangeLog: false
- deployment: privateNuget
displayName: Push to Private NuGet Feed
pool:
vmImage: "windows-latest"
environment: currietechnologies-prod
strategy:
runOnce:
deploy:
steps:
- task: DotNetCoreCLI@2
displayName: "Push to Private NuGet Feed"
inputs:
command: "push"
packagesToPush: "$(Pipeline.Workspace)/NuGetPackage/*.nupkg"
nuGetFeedType: "internal"
publishVstsFeed: "92bb098c-7077-481e-813d-9c0d49ec780d"
- deployment: publicNuget
displayName: Push to NuGet.org
pool:
vmImage: "windows-latest"
environment: currietechnologies-prod
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
displayName: Push to NuGet.org
inputs:
command: "push"
packagesToPush: "$(Pipeline.Workspace)/NuGetPackage/*.nupkg"
nuGetFeedType: "external"
publishFeedCredentials: "NuGet All"
verbosityPush: "Normal"