Actions for twisted spectral triple and the transition from the Euclidean to the Lorentzian