What is the meaning of [spilled the beans]

We had planned this to be a surprise party for you, but Jason spilled the beans (reveal a secret).