Skip to content

Release with ruby-gem-release - #159

Merged
dblock merged 1 commit into
dblock/ci-performancefrom
dblock/ruby-gem-release
Nov 24, 2026
Merged

dblock merged 1 commit into
dblock/ci-performancefrom
dblock/ruby-gem-release

Conversation

@dblock

@dblock dblock commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #158. Replaces the manual rake release process with a manually dispatched ruby-gem-release 0.9.0 workflow that publishes through RubyGems Trusted Publishing, as in mongoid-history#280.

  • .github/workflows/release.yml calls the reusable workflow, but only from the default branch of mongoid/mongoid_search. It takes an optional version input and a dry-run input. The test command starts a mongo:8.0 container before bundle exec rake where specs need MongoDB.
  • script/release.rb builds the workflow with RubyConstant and Changelog::Intridea. A release dates the (Next) heading, then adds the next patch (Next) section.
  • The Rakefile installs the release tasks on MRI Ruby 3.3+ only. It disables Bundler's local release, release:rubygem_push, and release:source_control_push.
  • The gemspec loads the version file with require_relative, so release fixtures build their own version instead of the checkout's.
  • spec/release runs a full local release and rejects sections with only the placeholder, using the upstream RSpec helpers and never contacting RubyGems or GitHub.
  • RELEASING.md describes the new flow.
  • Moves the version from a gemspec literal into Mongoid::Search::VERSION in lib/mongoid_search/version.rb, which the gemspec loads with require_relative, and capitalizes the pending ## 0.6.0 (Next) heading, as the Intridea changelog format expects.
  • Ignore /vendor/bundle: ruby/setup-ruby with bundler-cache installs gems there, and the release's clean-checkout check otherwise rejects the run (see Ignore vendor/bundle mongoid-shell#33).

Before the first release (not done in this PR): create the release environment, add the RubyGems trusted publisher (mongoid/mongoid_search, release.yml, environment release, workflow repository dblock/ruby-gem-release), and allow Actions to push to the default branch. Then verify the setup with gh workflow run release.yml -R mongoid/mongoid_search -f dry-run=true.

Validation: bundle exec rake on Ruby 4.0.9 with local MongoDB: 36 files inspected, no offenses detected 68 examples, 0 failures actionlint passes.

This PR was written by an AI (Claude) on behalf of @dblock.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21iR4JxWxGGyXdJ3uc9

@dblock
dblock added this pull request to stack #160 November 23, 2026 23:33
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Danger Report

No issues found.

View run

@coveralls

coveralls commented Nov 23, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 45324087329

Warning

No base build found for commit 61162f7 on dblock/ci-performance.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 96.951%

Details

  • Patch coverage: 5 uncovered changes across 1 file (5 of 10 lines covered, 50.0%).

Uncovered Changes

File Changed Covered %
lib/mongoid_search/version.rb 5 0 0.0%
Total (2 files) 10 5 50.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 164
Covered Lines: 159
Line Coverage: 96.95%
Coverage Strength: 252.97 hits per line

💛 - Coveralls

Add a manually dispatched Release workflow that uses the
ruby-gem-release 0.9.0 reusable workflow with RubyGems Trusted
Publishing and optional dry runs. The Intridea changelog handler dates
the (Next) section and prepares the next patch version. Disable the
local Bundler release tasks, load the version file relative to the
gemspec so release fixtures build their own version, and cover the
release with ruby-gem-release RSpec helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21iR4JxWxGGyXdJ3uc9
@dblock
dblock force-pushed the dblock/ruby-gem-release branch from 74c903e to e26c7be Compare November 24, 2026 04:06
@dblock
dblock merged commit 67f8984 into master Nov 24, 2026
9 checks passed
@dblock
dblock deleted the dblock/ruby-gem-release branch November 24, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants