|
| 1 | +parameters: |
| 2 | + - name: "ReunionVersion" |
| 3 | + type: string |
| 4 | + default: '' |
| 5 | + - name: "ReunionFoundationVersion" |
| 6 | + type: string |
| 7 | + default: '' |
| 8 | + - name: "ReunionDWriteVersion" |
| 9 | + type: string |
| 10 | + default: '' |
| 11 | + - name: "ReunionWinUIVersion" |
| 12 | + type: string |
| 13 | + default: '' |
| 14 | + - name: "releaseBuild" |
| 15 | + type: boolean |
| 16 | + default: True |
| 17 | + |
| 18 | +jobs: |
| 19 | + |
| 20 | +- job: CreateVSIX |
| 21 | + pool: |
| 22 | + vmImage: 'windows-2019' |
| 23 | + |
| 24 | + variables: |
| 25 | + ${{if eq(parameters.releaseBuild, True) }}: |
| 26 | + VSIXBuildArgs: '/p:"RestoreSources=https://pkgs.dev.azure.com/microsoft/ProjectReunion/_packaging/Project.Reunion.Internal.ReleaseSigned/nuget/v3/index.json"' |
| 27 | + ${{if eq(parameters.releaseBuild, False) }}: |
| 28 | + VSIXBuildArgs: '' |
| 29 | + |
| 30 | + steps: |
| 31 | + - task: NuGetAuthenticate@0 |
| 32 | + inputs: |
| 33 | + nuGetServiceConnections: Internal-ReleaseSigned |
| 34 | + |
| 35 | + - task: VSBuild@1 |
| 36 | + displayName: 'Restore ProjectReunion.Extension.sln' |
| 37 | + inputs: |
| 38 | + solution: dev\VSIX\ProjectReunion.Extension.sln |
| 39 | + platform: 'Any CPU' |
| 40 | + configuration: '$(buildConfiguration)' |
| 41 | + msBuildArgs: '/t:restore /p:ReunionVersion="${{ parameters.ReunionVersion }}" /p:ReunionFoundationVersion="${{ parameters.ReunionFoundationVersion }}" /p:ReunionDWriteVersion="${{ parameters.ReunionDWriteVersion }}" /p:ReunionWinUIVersion="${{ parameters.ReunionWinUIVersion }}" ${{ variables.VSIXBuildArgs }}' |
| 42 | + |
| 43 | + - task: VSBuild@1 |
| 44 | + displayName: 'Build ProjectReunion.Extension.sln' |
| 45 | + inputs: |
| 46 | + solution: dev\VSIX\ProjectReunion.Extension.sln |
| 47 | + platform: 'Any CPU' |
| 48 | + configuration: '$(buildConfiguration)' |
| 49 | + msBuildArgs: '/p:ReunionVersion="${{ parameters.ReunionVersion }}" /p:ReunionFoundationVersion="${{ parameters.ReunionFoundationVersion }}" /p:ReunionDWriteVersion="${{ parameters.ReunionDWriteVersion }}" /p:ReunionWinUIVersion="${{ parameters.ReunionWinUIVersion }}" ${{ variables.VSIXBuildArgs }}' |
| 50 | + |
| 51 | + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 |
| 52 | + displayName: 'Component Governance Detection' |
| 53 | + inputs: |
| 54 | + scanType: 'Register' |
| 55 | + failOnAlert: true |
| 56 | + |
| 57 | + - ${{ if eq( parameters.releaseBuild, true) }}: |
| 58 | + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 |
| 59 | + displayName: 'CodeSign (vsix)' |
| 60 | + inputs: |
| 61 | + ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection' |
| 62 | + FolderPath: 'dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)' |
| 63 | + Pattern: ProjectReunion.Extension.vsix |
| 64 | + signConfigType: inlineSignParams |
| 65 | + inlineOperation: | |
| 66 | + [ |
| 67 | + { |
| 68 | + "KeyCode" : "CP-233016", |
| 69 | + "OperationCode" : "OpcSign", |
| 70 | + "Parameters" : { |
| 71 | + "FileDigest" : "/fd SHA256" |
| 72 | + }, |
| 73 | + "ToolName" : "sign", |
| 74 | + "ToolVersion" : "1.0" |
| 75 | + }, |
| 76 | + { |
| 77 | + "KeyCode" : "CP-233016", |
| 78 | + "OperationCode" : "OpcVerify", |
| 79 | + "Parameters" : {}, |
| 80 | + "ToolName" : "sign", |
| 81 | + "ToolVersion" : "1.0" |
| 82 | + } |
| 83 | + ] |
| 84 | +
|
| 85 | + - task: PublishBuildArtifacts@1 |
| 86 | + displayName: 'Publish ProjectReunion.Extension.VSIX' |
| 87 | + inputs: |
| 88 | + PathtoPublish: 'dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)\ProjectReunion.Extension.vsix' |
| 89 | + artifactName: 'VSIX' |
0 commit comments