The father of my baby (due in 4 weeks) and I were never in a relationship but he is a friend of my BIL, so we're friends and get along well. Although I would have preferred bub to have only my surname, FOB feels strongly that he wants a link to his daughter so we have compromised. I have gone back to my maiden name and this baby will have both our surnames in alphabetical order, hyphenated. Luckily both our surnames are of English origin, so they work well together.
I think each situation is different, I suppose you have to just do what is best for all concerned, including the baby.