GitHubActionsCommands.

SetEnvironmentVariable(string, string) Method

Summary

Creates or updates an environment variable for any steps running next in a job.

Syntax

public void SetEnvironmentVariable(string key, string value)

Examples

if (GitHubActions.IsRunningOnGitHubActions)
{
    GitHubActions.Commands.SetEnvironmentVariable(
        "CAKE_VERSION",
        Context.Environment.Runtime.CakeVersion.ToString(3));
}

Parameters

Name Type Description
key string The key.
value string The Value.

Return Value

Type Description
void