You can also add the "melee" tag to the line. This will help with not having to take the tag on and off when switching between casting spells and melee attacks (very useful for clerics with Lightbringer).

So, it would look like: IFT(undead); DMG: 1d6 radiant, melee

If you ever attacked with other melee weapons, you'd need one of the other solutions, but the above will allow you to cast cantrips and other spells and just leave the effect on the whole time.