I like to be straightforward with room to wiggle lol. I would say something like this.
"Okay, bare with me. This is going to be slightly awkward/embarassing but it all falls on me haha. I just have a confession that i've always wanted to tell you. Ever since I met you in school, gotten to know you, you instantly became a long term crush of mine. I know it may sound silly but you honestly made my school year great by just being yourself and getting to see you on a daily basis. I hope I get to meet someone out there just like you but you know, gay and well, feelings reciprocated haha".
Now the ball is in his court. I don't have to ask him his sexuality nor have him feel pressured into telling me. If he wants to pursue anything he can bring it up, if not then we can stay friends. If he has a problem with another guy having a crush on him then he's really not good for you haha. I just don't know the extent of your relationship with him as a friend to help with any other scenarios.
Hope it goes well! Don't forget to just be yourself!