Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#92](https://github.com/dblock/ruby-gem-release/pull/92): Document manual recovery from the preserved bundle when the default branch advances during publication - [@dblock](https://github.com/dblock).
- [#93](https://github.com/dblock/ruby-gem-release/pull/93): Document disabling the local Bundler `release` tasks so the workflow is the only release path - [@dblock](https://github.com/dblock).
- [#95](https://github.com/dblock/ruby-gem-release/pull/95): Rewrite the documentation in plain language, consolidating repeated rules so each lives in one place - [@dblock](https://github.com/dblock).
- [#98](https://github.com/dblock/ruby-gem-release/pull/98): Document installing release tasks from a separate release Gemfile with `Gem.loaded_specs` instead of `rescue LoadError` - [@dblock](https://github.com/dblock).
- Your contribution here.

## 0.9.0 (2026/11/20)
Expand Down
16 changes: 15 additions & 1 deletion docs/actions/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,21 @@ gem 'commonmarker', '~> 2.10', require: false
gem 'ruby-gem-release', '0.9.0', require: false
```

The workflow sets `BUNDLE_GEMFILE` for the whole job, so every step and default command, including the full `test` suite, uses this bundle. Commit or ignore the lockfile Bundler writes next to it; an untracked lockfile fails the clean-checkout check. In your Rakefile, wrap the release task setup in `rescue LoadError` so the main bundle works without the gem.
The workflow sets `BUNDLE_GEMFILE` for the whole job, so every step and default command, including the full `test` suite, uses this bundle. Commit or ignore the lockfile Bundler writes next to it; an untracked lockfile fails the clean-checkout check. In your Rakefile, install the release tasks only when the gem is in the active bundle, so the main bundle works without it:

```ruby
if Gem.loaded_specs.key?('ruby-gem-release')
require 'ruby-gem-release/workflow/ruby_gem'
require 'ruby-gem-release/changelog'

RubyGemRelease::Workflow::RubyGem.new(
version: RubyGemRelease::Version::RubyConstant.new(path: 'lib/example/version.rb', constant: 'VERSION'),
changelog: RubyGemRelease::Changelog::KeepAChangelog.new
).install_tasks
end
```

Prefer this to `rescue LoadError`, which also hides a real load failure in the gem or its dependencies and silently drops the release tasks.

### Timezone

Expand Down
Loading