chore(action): use the output file as action output

This commit is contained in:
orhun
2021-06-18 18:48:34 +03:00
parent ba9e17e7eb
commit bd34a55954

View File

@@ -9,13 +9,13 @@ mkdir -p "$(dirname $CHANGELOG_OUT)"
# Execute git-cliff # Execute git-cliff
git-cliff "$@" > "$CHANGELOG_OUT" git-cliff "$@" > "$CHANGELOG_OUT"
exit_code=$? exit_code=$?
changelog=$(cat "$CHANGELOG_OUT")
# Output to console # Output to console
echo "$changelog" cat "$CHANGELOG_OUT"
echo
# Set output # Set output
echo "::set-output name=changelog::$changelog" echo "::set-output name=changelog::$CHANGELOG_OUT"
# Pass exit code to the next step # Pass exit code to the next step
echo "::set-output name=exit_code::$exit_code" echo "::set-output name=exit_code::$exit_code"