The Gem plugin for the Detroit build system will build a gem during the package phase and releases it to rubygems.org (or other gem source) during the release phase.
T. Sawyer
gem "detroit-gem", "~> 0.2.0"