Step by step to publish:

First, you need to have it in a git repository:
git init # Only the first time
    git add -A
    git commit -m "Init commit"
Next, package your theme, by running the following command, replacing jekyll-theme-awesome with the name of your theme:
gem build jekyll-theme-awesome.gemspec
Finally, push your packaged theme up to the RubyGems service, by running the following command, again replacing jekyll-theme-awesome with the name of your theme:
gem push jekyll-theme-awesome-*.gem
To release a new version of your theme, update the version number in the gemspec file, ( jekyll-theme-awesome.gemspec in this example ), and then repeat Steps 1 - 3 above. We recommend that you follow Semantic Versioning while bumping your theme-version.