Directional transmission or amplification of microwave signals is indispensable in various applications involving sensitive measurements. In this work we show experimentally how to use a generic cavity optomechanical setup to nonreciprocally amplify microwave signals above 3 GHz in one direction by 9 dB and simultaneously attenuate the transmission in the opposite direction by 21 dB. We use a device including two on-chip superconducting resonators and two metallic drumhead mechanical oscillators. Application of four microwave pump-tone frequencies allows the design of constructive or destructive interference for a signal tone depending on the propagation direction. The device can also be configured as an isolator with lossless nonreciprocal transmission and 18 dB of isolation.