One way of doing that would be to look at the events, that an upgrade will cause.
Have a look at Events – Part 7 : Working with extended events – Update Manager, to see if that answers your requirements.
You will need a scheduled script that checks for the presence of some selected events.