Skip to content

Add NuGet publish job for Microsoft.DurableTask.Analyzers#662

Merged
YunchuWang merged 2 commits intomainfrom
copilot/add-nuget-publish-job-analyzers
Mar 11, 2026
Merged

Add NuGet publish job for Microsoft.DurableTask.Analyzers#662
YunchuWang merged 2 commits intomainfrom
copilot/add-nuget-publish-job-analyzers

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

Microsoft.DurableTask.Analyzers is 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 because 1ES.PublishNuget@1 fails the entire ADO job on duplicate version pushes (unlike ADO feeds, NuGet.org has no skip-on-duplicate behavior).

Changes

  • eng/publish/publish.yml: Added nugetRelease_Microsoft_DurableTask_Analyzers job after the Generators job, following the same pattern as all other package publish jobs:
    • Depends on nugetApproval
    • Downloads the drop artifact from officialPipeline
    • Pushes Microsoft.DurableTask.Analyzers.*.nupkg (excluding symbols) to NuGet.org via DurableTask org NuGet API Key
Original prompt

Problem

The package publish pipeline at eng/publish/publish.yml is missing a NuGet publish job for the Microsoft.DurableTask.Analyzers package.

Current state

  • The Analyzers project (src/Analyzers/Analyzers.csproj) has <IsPackable>true</IsPackable>, so the official build pipeline (eng/ci/official-build.ymleng/templates/build.yml) does build and pack it into a .nupkg.
  • The ADO release job in eng/publish/publish.yml uses a wildcard pattern (**/*.nupkg), so the Analyzers nupkg does get pushed to the internal ADO feed.
  • However, there is no dedicated NuGet publish job for Microsoft.DurableTask.Analyzers in the NuGet publishing section of eng/publish/publish.yml. Each package requires its own job because the 1ES.PublishNuget@1 task 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).
  • The CHANGELOG confirms that in v1.22.0 the "Analyzers package version" was bumped "to 1.22.0 stable release (from 0.3.0)", indicating this package is intended to be published to NuGet.

All 13 packages currently published to NuGet

  1. Microsoft.DurableTask.Abstractions
  2. Microsoft.DurableTask.Client
  3. Microsoft.DurableTask.Client.Grpc
  4. Microsoft.DurableTask.Client.OrchestrationServiceClientShim
  5. Microsoft.DurableTask.Generators
  6. Microsoft.DurableTask.Grpc
  7. Microsoft.DurableTask.Worker
  8. Microsoft.DurableTask.Worker.Grpc
  9. Microsoft.DurableTask.Client.AzureManaged
  10. Microsoft.DurableTask.Worker.AzureManaged
  11. Microsoft.DurableTask.ScheduledTasks
  12. Microsoft.DurableTask.ExportHistory
  13. Microsoft.DurableTask.Extensions.AzureBlobPayloads

What's missing

Microsoft.DurableTask.Analyzers — no NuGet publish job exists for it.

Required Change

Add a new NuGet publish job for Microsoft.DurableTask.Analyzers to eng/publish/publish.yml, following the same pattern as the other packages. The job should:

  • Be named nugetRelease_Microsoft_DurableTask_Analyzers
  • Have displayName: NuGet Release (Microsoft.DurableTask.Analyzers)
  • Depend on nugetApproval with condition: succeeded('nugetApproval')
  • Use the same templateContext (releaseJob, isProduction, pipelineArtifact from officialPipeline)
  • Use 1ES.PublishNuget@1 task with:
    • nuGetFeedType: external
    • publishFeedCredentials: '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-dotnet repo'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.proj to 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.yml has individual NuGet publish jobs for the following 13 packages:

# Package Publish Job
1 Microsoft.DurableTask.Abstractions
2 Microsoft.DurableTask.Client
3 Microsoft.DurableTask.Client.Grpc
4 Microsoft.DurableTask.Client.OrchestrationServiceClientShim
5 Microsoft.DurableTask.Generators
6 Microsoft.DurableTask.Grpc
7 Microsoft.DurableTask.Worker
8 Microsoft.DurableTask.Worker.Grpc
9 Microsoft.DurableTask.Client.AzureManaged
10 Microsoft.DurableTask.Worker.AzureManaged
11 Microsoft.DurableTask.ScheduledTasks
12 Microsoft.DurableTask.ExportHistory
13 Microsoft.DurableTask.Extensions.AzureBlobPayloads
14 Microsoft.DurableTask.Analyzers ❌ Missing

Why the Analyzer nupkg IS being built, but NOT published to NuGet

  1. Build: The official build pipeline ([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.

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
@YunchuWang YunchuWang marked this pull request as ready for review March 11, 2026 20:22
Copilot AI review requested due to automatic review settings March 11, 2026 20:22
@YunchuWang YunchuWang merged commit a141a2b into main Mar 11, 2026
10 checks passed
@YunchuWang YunchuWang deleted the copilot/add-nuget-publish-job-analyzers branch March 11, 2026 20:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_Analyzers job gated by nugetApproval.
  • Downloads the drop artifact from officialPipeline and pushes Microsoft.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants