You should not vent directly into the attic, as warm and humid air can cause mold to form. Mold will make your house very difficult to sell.

There should already be at least one vent built into your roof for bathroom fans. Check your attic and you will likely see the duct hoses leading to the roof. Go to Home Depot or whatever and get a splitter for the ducting. You should be able to share this roof vent for garden venting purposes.

The only problem I know of with this setup is that warm air would be vented often from the roof and would be visible to an IR camera. However, this is expected since bath fans and kitchen fans usually vent this way.

If you must vent directly into the attic, I would recommend installing a traditional attic vent fan with a humidistat. Roof and gable models are available. The humidistat will turn the fan on when a certain humidity is reached.