If the secret is the secret code that stops a nuclear bomb explosion, then yes, I’d tell the secret. But there have been extreme scenarios where I didn’t.
example #1 I once got into trouble with a group of people. I knew that one of them had done something wrong, but the person who told me made me swear not to say anything. She made me look really bad and everybody hated me. I accused her of what she had done, but would not reveal my source, so nobody believed me. I quit but never told them who my source was.
example #2 As some of you know, I am in an eternal legal battle with my ex. Her former lawyer told me something, but again made me swear never to tell anyone. Even though this information could have saved me a lot of trouble (and using it in court would have probably solved all my problems), I did not do so. However, the information did eventually leak out, and I officially informed the Ministry of Justice in my recent letter to them last Friday. But this is only 3 years later and after my daughter spent 6 months being molested by her as a result (partly) of me keeping my promise.