Set .avi as extension, target as ffmpeg and select the parameters with the button on the right.
Depending your needs, the official recommendation is to export as a H.264 Lossless animation to be able to use a Non-Linear Video Editor after.
Don’t forget that GIF is a lot limited in terms of color palette.
If you need a lossless single image animation, you could render all the frames as PNG files and assemble them as APNG (see sourceforge.net/projects/apngasm/) for a lot better result
I had the same question and tried this solution for my gif on a video player it gave me this result “This file isn’t playable. That might be because the file type is unsupported, the file extension is incorrect, or the file is corrupt.”