setup-darc-branch-publishing

Configure a dotnet repository branch to publish build artifacts through a Maestro channel.

20.6k|4.3k|Updated Jan 11, 2015
One-click install
npx skills add https://github.com/dotnet/roslyn --skill setup-darc-branch-publishing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-darc-branch-publishing
Source: https://github.com/dotnet/roslyn/tree/main/.github/skills/setup-darc-branch-publishing
Command: npx skills add https://github.com/dotnet/roslyn --skill setup-darc-branch-publishing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up a dotnet repository branch so its official builds register assets in the Build Asset Registry (BAR) and publish packages to a NuGet feed requires coordinating Darc channel associations, Azure Pipelines triggers, and Maestro configuration PRs, which is error-prone when done manually.

Core Features & Use Cases

  • Darc Default Channel Setup: Adds a branch-to-channel association via darc add-default-channel, with fallback authentication using GitHub and Azure DevOps tokens.
  • Official Pipeline Trigger Configuration: Edits azure-pipelines-official.yml so the target branch triggers official builds, both on the branch itself and via a durable PR to the default branch.
  • Verification and Error Handling: Verifies the channel association after the Maestro configuration PR merges and handles common failures like HTTP 401s, duplicate associations, and branch name mismatches.
  • Use Case: You want experimental branch demos/my-experiment in dotnet/roslyn to publish its official build packages to the General Testing channel so the team can consume them from a NuGet feed.

Quick Start

Ask the assistant to set up Darc publishing for the dotnet/roslyn branch demos/my-experiment to the General Testing channel.

Frequently Asked Questions about setup-darc-branch-publishing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish branch build artifacts to a NuGet feed in a dotnet repository?

Add a Darc default channel association linking the repository branch to a Maestro channel, then ensure the branch is included in the official pipeline trigger. Once the Maestro configuration PR merges, official builds register in BAR and publish to that channel's feed.

How do I add a Darc default channel for a branch?

Run darc add-default-channel with the channel name, branch, and repository URL. If GitHub authentication fails, pass --github-pat with a token from gh auth token; for Azure DevOps 401 errors, pass an Azure DevOps resource access token via --azdev-pat.

Why does darc add-default-channel fail with HTTP 401?

A 401 from GitHub means Darc cannot read the branch, so retry with --github-pat using an authenticated token. A 401 from the Maestro configuration repository requires an Azure DevOps access token for the dnceng organization passed via --azdev-pat.

Does the channel association take effect immediately after running darc?

No. The darc command creates a PR in the Maestro configuration repository, and the association is not active until that PR merges. Verify afterward with darc get-default-channels filtered by repository, branch, and channel.

What are the prerequisites for setting up branch publishing with Darc?

You need darc installed and authenticated with Maestro, the gh CLI authenticated for the source repository, and Azure CLI authenticated to the dnceng Azure DevOps organization. You also need permission to update the target branch and open PRs against the default branch.