You can use the new [FBX Exporter]( New FBX Exporter in 2017.2 page-7#post-3561897) to export the animation directly from Timeline to FBX. In the Timeline window, select the desired animation clip, then from the top menu select GameObject > Export Selected Timeline Clip. This will export the clip into an FBX containing only the animation (which can then be applied to the object in Unity or Maya).
If you want to export the animation into the same file as the animated object:
- create an animator controller and add the animation clip as a state
- add the animator controller as the controller on the object to animate’s Animator Component
- right click on the object and click “Export to FBX”
- In the Options make sure that for the “Include” option, “Model(s) + Animation” is selected (or “Animation Only” to only export the animation)
Hope this helps!