A stellar origin for the short-lived nuclides in the early Solar System