exportVariable function
Creates or updates an environment variable for any actions running NEXT in a job.
The current action does NOT have access to the new value, but all subsequent actions in a job will have access.
Environment variables are case-sensitive and you can include punctuation.
Implementation
void exportVariable(String name, String value) {
value = value.replaceAll('\n', '\\n');
final file = Platform.environment['GITHUB_ENV'];
if (file != null) {
_appendToFile(file, '$name=$value');
} else {
_echo('set-env', value, {'name': name});
}
}