you did the right thing. i also liked a girl for a long time before without telling her. then i told her i want to be friends, she did give me some contact number but completely ignore me after that. then i just told her i like her and she rejected me. i personally never regretted it though. i never really regret doing anything even when it turn out worse then that. it's a colourful part of my life and it made me who i am. i much rather fail spectacularly then not have enough passion to try something bold.
sure i cried and went emo for a while but now i can laugh and joke at it with my friends. so it went like something like.
me : i like you.... for a long time.
her: .... hang on i just had sushi
(take breath mint)
her: sorry i don't see you that way
what doesn't kill you make you stronger.