Cake.Yaml

A set of aliases to help with YAML Serialization

#addin nuget:?package=Cake.Yaml&version=3.1.1

<package id="Cake.Yaml" version="3.1.1" />

dotnet add package Cake.Yaml --version 3.1.1

<PackageReference Include="Cake.Yaml" Version="3.1.1" />

Aliases

YAML related cake aliases.

In order to use aliases from this addin, you will need to also reference YamlDotNet as an addin. Here is what including Cake.Yaml in your script should look like:

#addin package:?Cake.Yaml
#addin package:?YamlDotNet&version=4.2.1

General

DeserializeYaml<T>(ICakeContext, string) Deserializes the YAML from a string.
DeserializeYamlFromFile<T>(ICakeContext, FilePath) Deserializes the YAML from a file.
SerializeYaml<T>(ICakeContext, T) Serializes an object to a YAML string.
SerializeYamlToFile<T>(ICakeContext, FilePath, T) Serializes an object to a YAML file.