Try manually triggering the automation and see if it publishes to your MQTT server. Your trigger section looks correct, not sure about the action section. Doing the manual trigger will tell you if its correct.
Yes, my automation is on and the MQTT message is sent if I trigger manually the automation.
I’m running HassOS 1.13 on virtualbox (if this can be helpful).