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.
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.