A GaMnAs nanoelectromechanical resonator is used to obtain the first measurement of magnetostriction in a dilute magnetic semiconductor. Resonance frequency shifts induced by field-dependent magnetoelastic stress are used to simultaneously map the magnetostriction and magnetic anisotropy constants over a wide range of temperatures. Owing to the central role of carriers in controlling ferromagnetic interactions in this material, the results appear to provide insight into a unique form of magnetoelastic behavior mediated by holes.