-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathpr-build.yml
73 lines (61 loc) · 1.97 KB
/
pr-build.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
trigger: none
pr:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- checkout: self
persistCredentials: true
- task: NuGetCommand@2
displayName: Install GitVersion
inputs:
command: custom
arguments: install GitVersion.CommandLine -Version 5.12.0 -OutputDirectory $(Build.BinariesDirectory)/tools -ExcludeVersion
- script: $(Build.BinariesDirectory)/tools/GitVersion.CommandLine/tools/GitVersion.exe /output buildserver /nofetch /updateassemblyinfo
displayName: Determine Version (NetFX)
- script: $(Build.BinariesDirectory)/tools/GitVersion.CommandLine/tools/GitVersion.exe /output buildserver /nofetch /updateprojectfiles
displayName: Determine Version (NetCore)
- task: PowerShell@2
displayName: Update version in the vsix manifest
inputs:
filePath: 'MarkMpn.Sql4Cds.SSMS\update-version.ps1'
arguments: '$(GitVersion.AssemblySemVer)'
pwsh: true
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '**/*.csproj'
feedsToUse: 'select'
includeNuGetOrg: true
- task: VSBuild@1
displayName: Build
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:DeployExtension=false'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
testAssemblyVer2: |
**/MarkMpn.*.Tests.dll
!**\obj\**
- task: NodeTool@0
displayName: Install Node.js
inputs:
versionSpec: '20.x'
- script: |
call npm --no-git-tag-version version $(GitVersion.SemVer)
call npm i -g vsce
call git config --global url."https://github".insteadOf ssh://git@github
call git config --global url."https://github.com/".insteadOf git@github.com:
call yarn install
call gulp build
displayName: Build ADS extension
workingDirectory: '$(Build.SourcesDirectory)\AzureDataStudioExtension'