How to leave an LED on

The key phrase here is:

I need a program where I press and release

You need to detect when the button goes from "pressed" to "not pressed" and simply flip the state of the LED.