  Jarzynski's equality provides an elegant and powerful tool to directly
compute differences in free energy in Monte Carlo simulations and it can be
readily extended to lattice gauge theories to compute a large set of physically
interesting observables. In this talk we present a novel technique to determine
the thermodynamics of strongly-interacting matter based on this relation, which
allows for a direct and efficient determination of the pressure using
out-of-equilibrium Monte Carlo simulations on the lattice. We present results
for the equation of state of the $\mathrm{SU}(3)$ Yang-Mills theory in the
confined and deconfined phases. Finally, we briefly discuss the generalization
of this method for theories with fermions, with particular focus on the
equation of state of QCD.
