Connecting the secondary side of ignition coil to earth
It appears that, with the hot end of the secondary earthed, the high voltage (>12kV) reversed through the primary into the regulated power supply resulting in the transformer getting burnt due to insulation failure.

It is imperative that you disconnect the power supply from the mains immediately. With the insulation having failed, it would be extremely hazardous to handle it.

Take care!