What is the current supported method to set a step output in GitHub Actions?
Select an answer to reveal the explanation.
Short Explanation and Infographic
The old '::set-output::' workflow command was deprecated in 2022. The new way writes to the $GITHUB_OUTPUT environment file.
Full explanation below image
Full Explanation
GitHub deprecated the '::set-output::' workflow command in May 2022 due to security concerns with injection attacks. The replacement is writing to the $GITHUB_OUTPUT environment file: 'echo "name=value" >> $GITHUB_OUTPUT'. This file-based approach is safer and supports multiline values using a heredoc delimiter pattern. Setting 'export GITHUB_STEP_OUTPUT' is not a recognized pattern. You cannot define step outputs inline in YAML — they must be set at runtime by the step execution.