YarnRunner.

Publish(Action<YarnPublishSettings>) Method

Summary

execute 'yarn publish' with options
Assembly
Cake.Yarn.dll
Namespace
Cake.Yarn
Containing Type
YarnRunner

Syntax

public IYarnRunnerCommands Publish(Action<YarnPublishSettings> publishSettings = null)

Examples

Run 'yarn publish'

Task("Yarn-Publish")
    .Does(() =>
{
    Yarn.Publish();
});

Run 'yarn publish --new-version 1.2.3'

Task("Yarn-Publish-With-New-Version")
    .Does(() =>
{
    Yarn.Publish(settings => settings.NewVersion(1, 2, 3));
});

Run 'yarn publish --tag beta'

Task("Yarn-Publish-With-Tag")
    .Does(() =>
{
    Yarn.Publish(settings => settings.Tag("beta"));
});

Parameters

Name Type Description
publishSettings Action<YarnPublishSettings> options when running 'yarn publish'

Return Value

Type Description
IYarnRunnerCommands