import { c } from "https://deno.land/x/actionify@0.3.0/mod.ts";
const { exportVariable } = c;
You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the GITHUB_ENV environment file. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. The names of environment variables are case-sensitive, and you can include punctuation.
Once an environment variable is added in this way it can be removed by setting it to the empty string.
import { commands, step } from "https://deno.land/x/actionify@0.3.0/mod.ts";
const addStep = step()
.run(commands.exportVariable(
"AWESOME_ENV",
"this is the env",
));
// Set the variable to an empty string.
const removeStep = step()
.run(commands.exportVariable("AWESOME_ENV", ""));
If isDynamic
is set to true
the provided value is not wrapped in quotes
and will be run as an expression.