Using Azure Pipelines to publish the NuGet package from GitHub repo

Xiaodi Yan
18 min readDec 3, 2019

I have got used to configure Azure DevOps Pipelines with the classic editor that allows us to configure lots of properties of the tasks with a friendly user interface. But the better way to configure the Pipelines is by using YAML file. It is easy to fine-tune each option for your Pipeline, and easy to clone & share. That is why YAML is the default Pipelines configuration template in Azure DevOps nowadays. I have developed a simple NuGet package that integrates Azure DevOps to build and publish (Implementing a simple messenger component for WPF, UWP and Xamarin). I will demonstrate how to create a new pipeline with YAML file. Before we get started, let us spend several minutes to gain a basic understanding of YAML.

What is YAML?

YAML(YAML Ain’t Markup Language) is a human friendly data serialization standard for all programming languages.

— yaml.org

YAML is designed to be human-friendly and work well with modern programming languages for common everyday tasks. It is similar to JSON. Actually, you could treat YAML as the superset of JSON. Every JSON file is also a valid YAML file. But the difference is that they have different priorities. The foremost goal of JSON is simplicity and universality so it is easy to generate and parse in every modern programming language. But for YAML, the foremost design goal is to improve human readability. So YAML is a little bit more complex to generate and parse.

--

--

Xiaodi Yan
Xiaodi Yan

Written by Xiaodi Yan

Microsoft MVP (.NET & AI) / MCT / .NET, Azure, AI Developer / Learner

Responses (3)