Skip to content

Release with ruby-gem-release - #341

Merged
dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/ruby-gem-release
Nov 22, 2026
Merged

dblock merged 1 commit into
codegram:masterfrom
dblock:dblock/ruby-gem-release

Conversation

@dblock

@dblock dblock commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

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

Replaces the manual rake release process in RELEASING.md with a manually dispatched Release workflow using RubyGems Trusted Publishing, so no RubyGems API key is stored.

Changes

  • .github/workflows/release.yml: workflow_dispatch with optional version and dry-run inputs, calling dblock/ruby-gem-release/.github/workflows/release.yml@v0.9.0 on Ruby 4.0 with contents: write and id-token: write.
  • gemfiles/release.gemfile: loads the main Gemfile and adds ruby-gem-release 0.9.0 and commonmarker ~> 2.10. ruby-gem-release requires Ruby 3.3+, so keeping it out of the main bundle leaves the Ruby 2.7, 3.2 and JRuby CI jobs untouched. Its lockfile is ignored, like Gemfile.lock.
  • .gitignore: also ignores vendor/bundle, where the reusable workflow's ruby/setup-ruby bundler-cache installs gems; the release's clean-checkout check fails on untracked files.
  • Rakefile: installs the release tasks only when ruby-gem-release is in the active bundle (Gem.loaded_specs.key?('ruby-gem-release') after Bundler.setup, rather than rescue LoadError, so a real load failure isn't hidden), with RubyConstant for Hyperclient::VERSION and the Intridea changelog using the * Your contribution here. placeholder. Bundler's release, release:rubygem_push and release:source_control_push are replaced with tasks that abort and point to RELEASING.md, so nobody can publish around the workflow.
  • RELEASING.md: rewritten for the workflow: one-time setup, dry run, release, verification and recovery.

Validation

  • bundle exec rake passes with both the main bundle and BUNDLE_GEMFILE=gemfiles/release.gemfile on Ruby 4.0.9: 196 tests, 32 Spinach steps, RuboCop clean. actionlint is clean.
  • rake release aborts with the RELEASING.md pointer; the release:* tasks only appear with the release bundle.
  • Simulated the release steps in a throwaway clone with the workflow's environment variables and a local bare remote: release:validate passes; release:prepare turns ### 2.2.0 (Next) into ### 2.2.0 (2026/11/22) and removes the placeholder; release:bump commits "Prepare next development iteration, 2.2.1", sets VERSION to 2.2.1 and adds ### 2.2.1 (Next) with the placeholder. Nothing was published or pushed anywhere else.

Not Done (needs a maintainer)

  • Create the release environment (and optionally required reviewers).
  • Add the trusted publisher on https://rubygems.org/gems/hyperclient/trusted_publishers (repository codegram/hyperclient, workflow release.yml, environment release, workflow repository dblock/ruby-gem-release).
  • Then run gh workflow run release.yml -f dry-run=true to check the setup.

master has no branch protection or rulesets today, so the release pushes are allowed.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW

@coveralls

coveralls commented Nov 22, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — dblock:dblock/ruby-gem-release into codegram:master

Add a manually dispatched Release workflow that uses the
dblock/ruby-gem-release v0.9.0 reusable workflow and RubyGems Trusted
Publishing. It runs the full suite, dates the changelog, publishes the
gem, pushes the release commit and tag, creates a GitHub Release, and
bumps the patch version with a new Next section.

ruby-gem-release requires Ruby 3.3+, so it lives in
gemfiles/release.gemfile, which loads the main Gemfile; the Rakefile only
installs the release tasks when that bundle is used, so the Ruby 2.7,
3.2 and JRuby CI jobs are unaffected. The local Bundler release tasks
are disabled.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
@dblock
dblock force-pushed the dblock/ruby-gem-release branch from 896d9ff to 2dfec8a Compare November 22, 2026 15:01
@dblock
dblock merged commit 87ad4a6 into codegram:master Nov 22, 2026
12 checks passed
@dblock
dblock deleted the dblock/ruby-gem-release branch November 22, 2026 15:07
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