To be safe with 12V you could use a step-up switcher from Pololu Pololu 12V Step-Up Voltage Regulator U3V12F12.
Since hardly any current needed in 12V programming, you can feed the switcher right from the IO port. A 20-50 Ohm current limiting resistor is recommended for switcher's input capacitor in-rush current.