It is against ToS I'm pretty sure, I don't remember YouTube ever doing anything about it ever though since a lot of people really do share this information publicly.
The terms for the partner program aren't the same as for the YouTube website and are not available publicly (at least from my short search). I did read it a few years ago when I was considering monetizing a small channel I had and remember very vividly something along those lines in the terms.
I came across a YouTube creator who shared their revenue with their audience. They mentioned that the idea that sharing revenue is not allowed has been a myth for many years. However, I believe that some channel networks may prohibit creators from disclosing their revenue. Unfortunately, I cannot recall the name of the creator.