Skip to content

Automate gem releases with ruby-gem-release - #3078

Open
dblock wants to merge 1 commit into
ruby-grape:masterfrom
dblock:dblock/automate-gem-release
Open

dblock wants to merge 1 commit into
ruby-grape:masterfrom
dblock:dblock/automate-gem-release

Conversation

@dblock

@dblock dblock commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Use ruby-gem-release 0.6.0, pinning the development gem to 0.6.0 and the reusable workflow to v0.6.0. The manually dispatched workflow supports an optional version override and RubyGems Trusted Publishing, owning validation, artifact preservation, publication, release commits/tags, GitHub Releases, and the next patch-version iteration.

Use the library's Intridea changelog directly to preserve Grape's Features/Fixes headings and both contribution placeholders. Use RubyGemRelease::Markdown::Section directly in the README lifecycle hooks, removing the local README updater and tests for behavior now owned by the library. Use project.copy_files and project.configure_workflow to exercise the same workflow builder as production in separate Rake processes, replacing registry and hosted publication with local adapters. Keep the project-specific assertion of the complete README in both the release tag and development commit. Runtime dependencies remain unchanged.

The fixture configuration helper removes another 9 test lines, reducing this PR's additions from 124 to 115. The release spec is now 27 lines, with no handwritten fixture Rakefile. The original PR added 350 lines.

Required Before the First Release

Configure the GitHub release environment with maintainer approval and deployment restricted to master. Ensure branch/tag rules permit the release token to push the release and development commits and create version tags.

Configure the existing grape RubyGems trusted publisher with repository ruby-grape/grape, workflow release.yml, environment release, and the separate workflow repository dblock/ruby-gem-release. These settings are documented in RELEASING.md; this PR does not change repository protections or RubyGems configuration.

Validation

  • bundle exec rake: RuboCop and 3,318 examples pass, including the complete release workflow with local publication adapters.
  • actionlint .github/workflows/release.yml and bundle exec rake build pass.
  • The checked-in release spec runs capture, validation, preparation, resolution, checkpoint, local publication, development bump, and success in separate Rake processes. It verifies the complete stable/development README content and a clean checkout after the release.

No workflow was dispatched, and nothing was published to RubyGems or GitHub.

@dblock
dblock force-pushed the dblock/automate-gem-release branch 5 times, most recently from 69521ac to 28eb7b2 Compare November 11, 2026 19:11
Preserve Grape's two contribution sections and stable/development README updates while delegating publication to the pinned reusable workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the dblock/automate-gem-release branch from 28eb7b2 to dc1808b Compare November 11, 2026 19:26
@dblock
dblock marked this pull request as ready for review November 11, 2026 19:29
@dblock
dblock requested a review from ericproulx November 11, 2026 19:29
@dblock

dblock commented Nov 11, 2026 •

Copy link
Copy Markdown
Member Author

@ericproulx this automates Grape releases, would need some 1-time setup in GitHub and Rubygems for trusted publisher (copilot can do it for you), see above

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.

1 participant