Just open the Publish Settings window (File-->Publish Settings... or PC keyboard shortcut Ctrl+Shift+F12). If you don't already have "GIF Image (.gif)" checked off under the Formats tab, check it now. Click on the GIF tab at the top. Below the dimensions you'll see the Playback options: Static, or Animated. Click the radio button for "Animated." Then click OK.
Yeah. It's really that simple. You'd be surprised how often I forget anyway.