Add NuGet publish job for Microsoft.DurableTask.Analyzers#662
Merged
YunchuWang merged 2 commits intomainfrom Mar 11, 2026
Merged
Add NuGet publish job for Microsoft.DurableTask.Analyzers#662YunchuWang merged 2 commits intomainfrom
YunchuWang merged 2 commits intomainfrom
Conversation
Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add NuGet publish job for Microsoft.DurableTask.Analyzers
Add NuGet publish job for Microsoft.DurableTask.Analyzers
Mar 11, 2026
kaibocai
approved these changes
Mar 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated NuGet.org publish job for Microsoft.DurableTask.Analyzers in the release pipeline so the analyzer package can be pushed independently (avoiding duplicate-version failures from blocking other package publishes).
Changes:
- Adds
nugetRelease_Microsoft_DurableTask_Analyzersjob gated bynugetApproval. - Downloads the
dropartifact fromofficialPipelineand pushesMicrosoft.DurableTask.Analyzers.*.nupkg(excluding symbols) to NuGet.org using the existing credential.
You can also share your feedback on Copilot code review. Take the survey.
Merged
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.
Microsoft.DurableTask.Analyzersis built and packed by the official build pipeline and pushed to the internal ADO feed, but had no dedicated NuGet.org publish job — meaning it was never released to NuGet. Each package requires its own job because1ES.PublishNuget@1fails the entire ADO job on duplicate version pushes (unlike ADO feeds, NuGet.org has no skip-on-duplicate behavior).Changes
eng/publish/publish.yml: AddednugetRelease_Microsoft_DurableTask_Analyzersjob after the Generators job, following the same pattern as all other package publish jobs:nugetApprovaldropartifact fromofficialPipelineMicrosoft.DurableTask.Analyzers.*.nupkg(excluding symbols) to NuGet.org viaDurableTask org NuGet API KeyOriginal prompt
Problem
The package publish pipeline at
eng/publish/publish.ymlis missing a NuGet publish job for theMicrosoft.DurableTask.Analyzerspackage.Current state
src/Analyzers/Analyzers.csproj) has<IsPackable>true</IsPackable>, so the official build pipeline (eng/ci/official-build.yml→eng/templates/build.yml) does build and pack it into a.nupkg.eng/publish/publish.ymluses a wildcard pattern (**/*.nupkg), so the Analyzers nupkg does get pushed to the internal ADO feed.Microsoft.DurableTask.Analyzersin the NuGet publishing section ofeng/publish/publish.yml. Each package requires its own job because the1ES.PublishNuget@1task fails the entire ADO job if any package version already exists on NuGet (duplicate version pushes are only skippable for ADO feeds, not NuGet.org).All 13 packages currently published to NuGet
Microsoft.DurableTask.AbstractionsMicrosoft.DurableTask.ClientMicrosoft.DurableTask.Client.GrpcMicrosoft.DurableTask.Client.OrchestrationServiceClientShimMicrosoft.DurableTask.GeneratorsMicrosoft.DurableTask.GrpcMicrosoft.DurableTask.WorkerMicrosoft.DurableTask.Worker.GrpcMicrosoft.DurableTask.Client.AzureManagedMicrosoft.DurableTask.Worker.AzureManagedMicrosoft.DurableTask.ScheduledTasksMicrosoft.DurableTask.ExportHistoryMicrosoft.DurableTask.Extensions.AzureBlobPayloadsWhat's missing
Microsoft.DurableTask.Analyzers— no NuGet publish job exists for it.Required Change
Add a new NuGet publish job for
Microsoft.DurableTask.Analyzerstoeng/publish/publish.yml, following the same pattern as the other packages. The job should:nugetRelease_Microsoft_DurableTask_AnalyzersdisplayName: NuGet Release (Microsoft.DurableTask.Analyzers)nugetApprovalwithcondition: succeeded('nugetApproval')templateContext(releaseJob, isProduction, pipelineArtifact from officialPipeline)1ES.PublishNuget@1task with:nuGetFeedType: externalpublishFeedCredentials: 'DurableTask org NuGet API Key'packagesToPush: '$(System.DefaultWorkingDirectory)/drop/Microsoft.DurableTask.Analyzers.*.nupkg;!$(System.DefaultWorkingDirectory)/**/*.symbols.nupkg'packageParentPath: $(System.DefaultWorkingDirectory)Place the new job in a logical location within the file (e.g., after the Generators job or at the end before the Extensions.AzureBlobPayloads job, since it's alphabetically close).
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: check if package publish pipeline includes analyzer package for publishing
Assistant: The lexical search didn't find results within the
microsoft/durabletask-dotnetrepo's pipeline files. Let me look more specifically at the CI/CD and release pipeline configurations in the repo.Assistant: Now let me check the
src/dirs.projto see which projects are included in the build (and thus which nupkgs are produced), and also check if the Analyzers project is packable:Assistant: Now let me check the Release.props to see what NuGet package ID the Analyzers project produces:
Assistant: After reviewing the full publish pipeline and build configuration, here's my analysis:
❌ The Analyzer package is NOT included in the NuGet publish pipeline
What the pipeline publishes (NuGet section in
eng/publish/publish.yml)The publish pipeline at
eng/publish/publish.ymlhas individual NuGet publish jobs for the following 13 packages:Microsoft.DurableTask.AbstractionsMicrosoft.DurableTask.ClientMicrosoft.DurableTask.Client.GrpcMicrosoft.DurableTask.Client.OrchestrationServiceClientShimMicrosoft.DurableTask.GeneratorsMicrosoft.DurableTask.GrpcMicrosoft.DurableTask.WorkerMicrosoft.DurableTask.Worker.GrpcMicrosoft.DurableTask.Client.AzureManagedMicrosoft.DurableTask.Worker.AzureManagedMicrosoft.DurableTask.ScheduledTasksMicrosoft.DurableTask.ExportHistoryMicrosoft.DurableTask.Extensions.AzureBlobPayloadsMicrosoft.DurableTask.AnalyzersWhy the Analyzer nupkg IS being built, but NOT published to NuGet
eng/ci/official-build.yml](https://github.com/micros...This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.