It is sad to think about it but it is going to happen again. We know it has happened at least 6 times already. I was reading that 75,000 years ago the human race was darn near wiped out by the mount Toba volcanic eruption. Scientists think that only 1,000 of our species survived that event. Hopefully we can survive long enough to get out of the system and finds some habitable planets to colonize. Then if the worst happens at least some will go on.
Just to be safe from a major supernova, t'would be best to spread into at least one neighboring galaxy.
Even better would be to annex a couple of spare rooms of the Multiverse.
Doesn't do much good to spread one's eggs into multiple baskets, then leave them all sitting on the same rickety table.