This way the writing of the JSON file is handled automatically if the update does not fail.
It pave the way to further global improvements, such as a better error handling.
It may not be the best place for that (gha.py would have been better), but it's the shorter / faster way to do it for now.
Moreover it now uses logging for writing the group. The logger format has been updated for this to work. This was done to fix issues on GitHub Action logs, where groups were declared after the logs.
Automation is only for the latest 3 majors version (2022, 2019 and 2017) as there is no release history published for 2015 and below.
This is not a big deal because there was no version for those release in a very long time.