This is more or less standard material on Grothendieck and Serre Duality Theory, and there are several references available.
For instance, the stetement that you want is a consequence of the results in Chapter 5 of S.Ishii's book Introduction to Singularities.
Look in particular at Theorem 5.3.6, Theorem 5.3.8 and Corollary 5.3.9.