Export animation with only bones ?

Hi I wonder is it possible to just export animation with only bones ? I have been reseaching for a while but I can't seem to find a solution.
The reason I want to export just bones because to reduce file size for unity.
Thank you so much for your help.