Create a two step keymap for your shadowbolt that triggers on key up or down. Put shadowbolt macro on step 1, life tap on step 2.

It will cast shadowbolt until you don't have enough mana, then...