Dnd 5e Green flame blade and Flames of Phlegethos stacking [duplicate]

I’m playing an eldritch knight, and I’m looking to optimize the damage of green flame blade. The feature “flames of Phlegethos” states that “When you roll fire damage for a spell you cast, you can reroll any roll of 1 on the fire damage dice, but you must use the new roll, even if it is another 1. Whenever you cast a spell that deals fire damage, you can cause flames to wreathe you until the end of your next turn. The flames don’t harm you or your possessions, and they shed bright light out to 30 feet and dim light for an additional 30 feet. While the flames are present, any creature within 5 feet of you that hits you with a melee attack takes 1d4 fire damage” would both the 1d4 fire damage and the re-roll 1’s on fire damage trigger when using green flame blade? Or is this meant for spells of level 1 and higher?