ci: migrate release pipeline to 1ES Official template with ESRP siging and NuGet push#259
Merged
Merged
Conversation
…ng and NuGet push
Replace the legacy onebranch-based release pipeline with a 1ES Pipeline
Template extends shape that:
- Extends `v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates`
on `Azure-Pipelines-1ESPT-ExDShared` (windows-2022) so all signing
steps run on a Windows 1ES-managed pool.
- Builds + tests the main solution with `--configuration Release`
(the previous pipeline silently produced Debug-compiled nupkgs).
- Signs produced toolkit assemblies with `EsrpCodeSigning@5` using
Authenticode (`CP-230012`) before pack so signed binaries end up
inside the `.nupkg`. Pattern is restricted to our owned files
(Authoring, Analyzers, Core, Compiling.{dll,exe}, Decompiling.{dll,exe},
Testing) to avoid signing third-party dependencies pulled into bin.
- Packs with `--no-build` so the signed assemblies are embedded.
- Signs produced `*.nupkg` with `EsrpCodeSigning@5` using the NuGet
signing profile (`CP-401405`) and verifies the signature with
`nuget verify -All`.
- Restores + builds + tests the example solution as a sanity check that
the freshly produced (and, on tagged runs, signed) packages work
end-to-end through the example's `../output` package source.
- Publishes the signed packages as a 1ES `pipelineArtifact`
(`SignedPackages`).
- Adds a `publish` deployment stage (`templateContext.type: releaseJob`,
`isProduction: true`, environment `nuget-org`) that pushes the
signed packages to NuGet.org via `1ES.PublishNuget@1` against the
`api-management-policy-toolkit-nuget-connection` service connection.
All signing, package verification, and publishing steps are tag-gated
with `startsWith(variables['Build.SourceBranch'], 'refs/tags/v')`.
Manual non-tag runs still execute the full build + test path (sanity
check) but skip ESRP signing and NuGet push.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tomkerkhove
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the legacy onebranch-based release pipeline with a 1ES Pipeline Template extends shape that:
v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplatesonAzure-Pipelines-1ESPT-ExDShared(windows-2022) so all signing steps run on a Windows 1ES-managed pool.--configuration Release(the previous pipeline silently produced Debug-compiled nupkgs).EsrpCodeSigning@5using Authenticode (CP-230012) before pack so signed binaries end up inside the.nupkg. Pattern is restricted to our owned files (Authoring, Analyzers, Core, Compiling.{dll,exe}, Decompiling.{dll,exe}, Testing) to avoid signing third-party dependencies pulled into bin.--no-buildso the signed assemblies are embedded.*.nupkgwithEsrpCodeSigning@5using the NuGet signing profile (CP-401405) and verifies the signature withnuget verify -All.../outputpackage source.pipelineArtifact(SignedPackages).publishdeployment stage (templateContext.type: releaseJob,isProduction: true, environmentnuget-org) that pushes the signed packages to NuGet.org via1ES.PublishNuget@1against theapi-management-policy-toolkit-nuget-connectionservice connection.All signing, package verification, and publishing steps are tag-gated with
startsWith(variables['Build.SourceBranch'], 'refs/tags/v'). Manual non-tag runs still execute the full build + test path (sanity check) but skip ESRP signing and NuGet push.