How to release a gem¶ ↑
This document describes a process of releasing a new version of a gem.
-
Bump version.
git commit -m "Bump 1.<x>.<y>"
We're (kinda) using semantic versioning:
-
Bugfixes should be released as fast as possible as patch versions.
-
New features could be combined and released as minor or patch version upgrades (depending on the size of the feature—it's up to maintainers to decide).
-
Breaking API changes should be avoided in minor and patch releases.
-
Breaking dependencies changes (e.g., dropping older Ruby support) could be released in minor versions.
How to bump a version:
-
Change the version number in
lib/<%= name_path %>/version.rb
file. -
Update the changelog (add new heading with the version name and date).
-
Update the installation documentation if necessary (e.g., during minor and major updates).
-
Push code to GitHub and make sure CI passes.
git push
-
Release a gem.
gem release -t git push --tags
We use gem-release for publishing gems with a single command:
gem release -t
Don't forget to push tags and write release notes on GitHub (if necessary).