A description of a toolset and flow to do automated releases of an open source repo from github to rubygems.org using Travis, Jeweler, and CodeClimate.
7. INGREDIENTS
➤ RubyGems Account
➤ Travis-CI.org Account
➤ hooked up to your Github account via OAuth
➤ Github Ruby repo
➤ that you own (or for an Org)
➤ must be Public
12. PRO TIP: USE THE TRAVIS GEM TO ADD RUBYGEMS DEPLOY
$ travis setup rubygems [-—force]
Gem name: |expect-behaviors|
Release only tagged commits? |yes|
Release only from francisluong/expect-behaviors? |yes|
Encrypt API key? |yes|
$
This uses the rubygems.org key from Step 1 and
encrypts it.
13. .TRAVIS.YML - NOW WITH DEPLOY SECTION
language: ruby
rvm:
- 2.2.0
- 2.0.0
deploy:
provider: rubygems
api_key:
secure: VThxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
gem: expect-behaviors
on:
tags: true
repo: francisluong/expect-behaviors
install:
- bundle install
script:
- uname -s
- rake test
22. 2 STEPS TO RELEASE
➤ Preconditions: Master is in a good state for release
1. Commit a Version Bump and Gemspec. Push.
2. Create a Release Tag on Github
Travis responds to this by attempting a test/build/
deploy after testing