Drop Rails 7.x, move to non-EoL Ruby, publish from a tag - #37
Conversation
Rails 7.1 went EoL on 2025-10-01 and 7.2 on 2026-08-09, Ruby 3.2 on 2026-03-31. What is left is Rails / ActiveRecord 8.0 and 8.1 on Ruby 3.3, 3.4 and 4.0, which lets sqlite3 sit at 2.x in every Gemfile. Ruby 4.0 dropped rdoc from the default gems, so the Rakefile's RDoc task made `rake` fail on the activerecord-only gemfiles; RubyGems.org builds the published documentation itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Pushing a `v*` tag builds the gem, pushes it and cuts the GitHub release. The push authenticates through RubyGems trusted publishing, so the repository holds no API key and the gem keeps `rubygems_mfa_required`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 014f3da326
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Configure RubyGems credentials | ||
| uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0 | ||
| - name: Push the gem | ||
| run: gem push pp_sql-*.gem |
There was a problem hiding this comment.
Make release creation retryable after publishing
If gh release create fails after the gem is successfully published—for example, due to a transient GitHub API or asset-upload failure—rerunning this workflow stops here because RubyGems rejects publishing the same name/version again, so the GitHub release can never be retried through the workflow. gem help push confirms that this command uploads the gem and adds it to the index, while gh release create --help describes release creation as a separate later operation. Make the publication/release sequence idempotent, such as by detecting an already-published gem and continuing to the release step.
Useful? React with 👍 / 👎.
Drops Rails 7.x, moves the test matrix to non-EoL Ruby, and adds a tag-driven
RubyGems release.
Support matrix
required_ruby_version>= 3.1.0>= 3.3.0activerecorddependency>= 8.0>= 1.4~> 2.0Rails 7.1 is EoL since 2025-10-01, Rails 7.2 since 2026-08-09, Ruby 3.2 since
2026-03-31. The appraisal gemfiles already carried sqlite3
~> 2.0; the rootGemfile was the last place holding 1.x.
Release workflow
.github/workflows/release.ymlruns on av*tag: it checks the tag againstPpSql::VERSION, builds the gem, pushes it to RubyGems.org and creates theGitHub release. The push authenticates through RubyGems trusted publishing over
the Actions OIDC token, so the repository stores no API key and the gem keeps
rubygems_mfa_required.Before the first tag, a trusted publisher has to exist for the gem on
RubyGems.org: owner
kvokka, repositorypp_sql, workflowrelease.yml,environment empty.
Rakefile
Ruby 4.0 removed rdoc from the default gems, so
require 'rdoc/task'maderakefail on the activerecord-only gemfiles. The RDoc task is gone;RubyGems.org builds the documentation of the published gem itself.
Verification
Every matrix cell — Ruby 3.3, 3.4 and 4.0 against rails and activerecord 8.0
and 8.1 — ran in the official ruby images: 13 tests on the rails gemfiles, 11 on
the activerecord ones, no failures.
Version
This ships as 2.3.0, the first release since 2.1.0.