|
| 1 | +# Build and sign executable and installer for AnalyzeInExcel external tool |
| 2 | +# The BuildInstaller@1 task requires VS2017 |
| 3 | + |
| 4 | +trigger: |
| 5 | +- none |
| 6 | + |
| 7 | +pool: Default |
| 8 | + |
| 9 | +variables: |
| 10 | + solution: '**/*.sln' |
| 11 | + buildPlatform: 'Any CPU' |
| 12 | + buildConfiguration: 'Release' |
| 13 | + |
| 14 | +steps: |
| 15 | + |
| 16 | +- task: UseDotNet@2 |
| 17 | + displayName: Use .NET Core 2.1 |
| 18 | + inputs: |
| 19 | + version: '2.1.x' |
| 20 | + packageType: runtime |
| 21 | + |
| 22 | +- task: DotNetCoreCLI@2 |
| 23 | + inputs: |
| 24 | + command: 'custom' |
| 25 | + custom: 'tool' |
| 26 | + arguments: 'update --global azuresigntool' |
| 27 | + displayName: Install AzureSignTool |
| 28 | + |
| 29 | +- task: NuGetToolInstaller@1 |
| 30 | + |
| 31 | +- task: NuGetCommand@2 |
| 32 | + inputs: |
| 33 | + restoreSolution: '$(solution)' |
| 34 | + |
| 35 | +- task: VSBuild@1 |
| 36 | + inputs: |
| 37 | + solution: '$(solution)' |
| 38 | + platform: '$(buildPlatform)' |
| 39 | + configuration: '$(buildConfiguration)' |
| 40 | + |
| 41 | +- script: AzureSignTool sign -kvu "$(SigningVaultURL)" -kvi "$(SigningClientId)" -kvs "$(SigningClientSecret)" -kvc "$(SigningCertName)" -tr http://timestamp.digicert.com -v "$(Build.SourcesDirectory)/AnalyzeInExcel/bin/Release/AnalyzeInExcel.exe" "$(Build.SourcesDirectory)/ExternalToolsInstaller/bin/Release/ExternalToolsInstaller.dll" |
| 42 | + name: CodeSigningEXEDLL |
| 43 | + |
| 44 | +- task: BatchScript@1 |
| 45 | + inputs: |
| 46 | + filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe' |
| 47 | + workingFolder: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\' |
| 48 | + |
| 49 | +- task: BuildInstaller@1 |
| 50 | + inputs: |
| 51 | + installTaskMode: 'vdproj' |
| 52 | + SlnPath: 'AnalyzeInExcel.sln' |
| 53 | + VdprojPath: 'SetupAnalyzeInExcel/SetupAnalyzeInExcel.vdproj' |
| 54 | + VsVersion: 'VS2017' |
| 55 | + |
| 56 | +- task: BatchScript@1 |
| 57 | + inputs: |
| 58 | + filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\DisableOutOfProcBuild.exe' |
| 59 | + workingFolder: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\' |
| 60 | + arguments: 'undo' |
| 61 | + |
| 62 | +- script: AzureSignTool sign -kvu "$(SigningVaultURL)" -kvi "$(SigningClientId)" -kvs "$(SigningClientSecret)" -kvc "$(SigningCertName)" -tr http://timestamp.digicert.com -v "$(Build.SourcesDirectory)/SetupAnalyzeInExcel/Release/AnalyzeInExcel.msi" |
| 63 | + name: CodeSigningMSI |
| 64 | + |
| 65 | +- task: CopyFiles@2 |
| 66 | + inputs: |
| 67 | + Contents: '$(Build.SourcesDirectory)/SetupAnalyzeInExcel/Release/AnalyzeInExcel.msi' |
| 68 | + TargetFolder: '$(build.artifactstagingdirectory)/drop' |
| 69 | + |
| 70 | +#publish artifacts |
| 71 | +- task: PublishBuildArtifacts@1 |
| 72 | + displayName: 'Publish Artifact: drop' |
| 73 | + inputs: |
| 74 | + PathtoPublish: '$(build.artifactstagingdirectory)/drop' |
| 75 | + |
0 commit comments