Gem deployment - Smashing/smashing GitHub Wiki
The best resource for deploying a gem to RubyGems is their guide about it: Publishing your Gem.
Permissions
Another developer must grant you permission to publish gems in RubyGems. You can start by signing up with RubyGems.
Environment set up
If you are using Ubuntu LTS (18.04) you can try the following.
- Install
rbenv
. DigitalOcean has a good tutorial for Ubuntu. - Install stable
ruby
(at time of writing:2.7.1
)
e.g.
rbenv install 2.7.1
rbenv global 2.7.1
- Create symlinks for
ruby
andgem
or add the$HOME/.rbenv/versions/2.7.1/bin
directory to your$PATH
environment variable. gem install bundler
. This will install the Smashing gem dependencies, and you should be able to use./bin/smashing
to run with the latest modifications.
Useful commands
Commands are not in any special order. They may be useful when building or testing the Gem locally.
gem list
gem install --user $gem
bundle install
gem build smashing.gemspec
&&gem install smashing-1.2.0.gem
irb
and thenrequire 'smashing'
Release Checklist
- Check any open issues or pending PRs (anything that deserves label:security?)
- Confirm the GitHub milestone is good
- Update version in gemspec and in version.rb, and also the date in gemspec
- Do we need to update the Changelog? Maybe the release date?
- Try
rake test
or testing the current version. Does it work? - Create tag
- Create GitHub release from tag
- Upload to RubyGems
gem build smashing.gemspec
gem push smashing-1.1.1.1....gem
- Announce it