setOutput function

void setOutput(
  1. String name,
  2. String value
)

Sets an action's output parameter.

Optionally, you can also declare output parameters in an action's metadata file. For more information, see "Metadata syntax for GitHub Actions."

Implementation

void setOutput(String name, String value) {
  final file = Platform.environment['GITHUB_OUTPUT'];
  if (file != null) {
    _appendToFile(file, _prepareKeyValueMessage(name, value));
  } else {
    _echo('set-output', value, {'name': name});
  }
}