Stable rank of $\mathrm{C}(X)\rtimes\Gamma$