How to detect release of GetKey?

The object doesn’t come to 0,0,0 rotation as Key is released. But it come to 0,0,0 when i press key again.

using UnityEngine;
using System.Collections;

public class Kicker : MonoBehaviour {
	Vector3 rotationEuler;
	public float kickspeed;
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
		if (Input.GetKey (KeyCode.Space)) {

				rotationEuler += Vector3.forward * kickspeed * Time.deltaTime; //increment 30 degrees every second
				transform.rotation = Quaternion.Euler (rotationEuler);
			
		}
		
		else {
			
			Debug.Log("Released");
			rotationEuler = new Vector3(0,0,0);
		}
		
		
	}

}

Coroutines brother!

public class Kicker : MonoBehaviour {
    //Speed of Kick
    public float KickSpeed;

    //Speed of Kick Returning
    public float ReturnSpeed;

    //Angle of Kick
    public float KickAngle;
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.Space))
            StartCoroutine(StartKick());
	}

    IEnumerator StartKick()
    {
        //Total Angle kick has moved from the Start
        float TotalAngleMoved = 0f;

        //Reference to the Updated Rotation of our Kick
        Vector3 RotationRef = transform.eulerAngles;

        //True if the Kick has not surpassed the wanted KickAngle
        while (TotalAngleMoved < KickAngle)
        {
            //Get the new Rotation of the Kick 
            float AngleMovedThisFrame = KickSpeed * Time.deltaTime;
            TotalAngleMoved += AngleMovedThisFrame;
            RotationRef.z += AngleMovedThisFrame;

            //Set the new Rotation on our Transform
            transform.eulerAngles = RotationRef;

            yield return null;//Keep Looping every frame
        }

        //-- We have finished Kicking --

        //Makes sure that the Kick Angle does not exceed
        RotationRef.z -= (TotalAngleMoved - KickAngle); //Deducts the extra angle
        transform.eulerAngles = RotationRef;

        //You can have a delay before it returns to its position if you want
        //yield return new WaitForSeconds(1f);

        //You can wait until the Key is released before it returns to its position
        while (!Input.GetKeyUp(KeyCode.Space))
            yield return null;

        //-- Time to start putting it down --

        //Reset the TotalAngleMoved
        //Use this like the previous while loop, but we're just moving it down
        TotalAngleMoved = 0f;

        //True if the Kick has not returned to its original Angle
        while (TotalAngleMoved < KickAngle)
        {
            //Get the new Rotation of the Kick 
            float AngleMovedThisFrame = ReturnSpeed * Time.deltaTime;
            TotalAngleMoved += AngleMovedThisFrame;
            RotationRef.z -= AngleMovedThisFrame; //Negative this time because we're going backwards

            //Set the new Rotation on our Transform
            transform.eulerAngles = RotationRef;

            yield return null;//Keep Looping every frame
        }

        //-- We have finished Returning --        
        
        //Makes sure that the Return Angle does not exceed
        RotationRef.z += (TotalAngleMoved - KickAngle); //Adds the extra angle
        transform.eulerAngles = RotationRef;

    }
}

use input.GetKeyUp