Spectrally resolved helium absorption from the extended atmosphere of a warm Neptune-mass exoplanet