Skip to content

Commit

Permalink
Document release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Sep 4, 2020
1 parent c7b92cf commit eea9e7d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# How to release Standard Ruby

Because this gem was generated with the [bundler `gem`
command](https://bundler.io/man/bundle-gem.1.html), [our Rakefile](/Rakefile)
loads `bundler/gem_tasks`, which provides a lot of the commands one needs
to manage a gem's release lifecycle:

```
$ rake -T
rake build # Build standard-x.x.x.gem into the pkg directory
rake clean # Remove any temporary products
rake clobber # Remove any generated files
rake install # Build and install standard-x.x.x.gem into system gems
rake install:local # Build and install standard-x.x.x.gem into system gems without network access
rake release[remote] # Create tag vx.x.x and build and push standard-0.5.2.gem to rubygems.org
```

Most of these commands are depended on (read: run by) `rake release`, which is
really the only one we'll need for releasing the gem to
[Rubygems.org](https://rubygems.org/gems/standard).

## Release steps

1. Make sure git is up to date and `bundle exec rake` exits cleanly
2. Bump the appropriate version segment in `lib/standard/version.rb` (basic
semantic versioning rules apply; if the release updates Rubocop, follow its
version bump at a minimum—if rubocop saw minor bump, we'll also bump the
minor version)
3. Run `bundle` so that Bundler writes this version to `Gemfile.lock`
4. Update `CHANGELOG.md` as exhaustively as you are able and set the top header
to that of the new version
5. Commit `lib/standard/version.rb`, `Gemfile.lock`, and `CHANGELOG.md` together
with the message equal to the new version (e.g. "0.42.1")
6. Finally, run `bundle exec rake release`, which will hopefully succeed
7. Provide your multi-factor-auth token when prompted to finish publishing the
gem
8. [Tweet](https://twitter.com) about your awesome new release! (Shameless
self-promotion is the most important part of open source software)

0 comments on commit eea9e7d

Please sign in to comment.