The sun doesn't have enough mass to go supernova, but it will become a Red Giant and die within 5 billion years. However, in just one billion years the temperatures on Earth will be so hot that life will cease to exist. Now, what's interesting is that life itself may actually add another 1.3 billion years to the planet's habitable lifespan. Nitrogen makes up most of the atmosphere, and the reduction of nitrogen on a massive scale will result in less air pressure. Lower air pressure makes "holes", so to speak in the atmosphere allowing heat to escape. So, if you were to remove much of the unreactive nitrogen gas, you would cool the Earth. This is happening naturally because living things consume nitrogen and bury it with them when they die. Nitrogen levels have been decreasing throughout history, which supports the theory.