From D&D Wiki
Aasimar is recommended here, especially protector for the fly speed, as it synergises with the features we're going to get.
You can do this in any order really, so long as you end up with at least 5 levels in hexblade warlock (taking pact of the blade, extra attack and eldritch smite) and 10 levels in bard (whispers is a good choice) taking Holy Weapon and one other spell for your magical secrets.
Take sharpshooter and optionally piercer or poisoner.
With all your features active you'll be doing 1d8+cha+proficency+level*+10 (~35) damage on attacks, with bracers of archery and +1/2/3 bow or arrows and that can be +40-50 on damage rolls by level 20.
Not to mention Psychic blades, Eldritch Smite and Holy Weapon all work on ranged weapon attacks.
*only on one attack per turn