Let Travis Push your RubyGems

With Travis CI, you are able to automatically deploy your applications to Heroku, Nodejitsu, and Openshift.

Now, it’s also possible to release to RubyGems!

To set up continuous releasing to RubyGems, add the following lines to your .travis.yml:

deploy:
    provider: rubygems
    api_key: "YOUR-ENCRYPTED-API-KEY"

Or, if you’ve installed our handy command line tool, just use the setup command:

$ travis setup rubygems

However, releasing a gem is different than deploying an application. You probably don’t want every single build to be released. Instead, you can configure Travis CI to only deploy build with tags. This allows you to only release when you have a new version of your gem ready. Just add tags: true to the on section of your .travis.yml so it looks like this:

deploy:
    provider: rubygems
    api_key ...
    on:
        tags: true

An alternative approach is to let Travis CI push pre-releases and still do manual releases yourself. Look at what our deploy tool does internally for some inspiration.

And you’re all set!

This feature is immediately available to all our users including our Travis Pro customers.

Is your provider still missing?

If you’d like to see your provider supported on Travis CI, contact us or fork us on Github.