Skip to content

Release workflow: publish to RubyGems.org from GitHub Actions - #56

Draft
PetrHeinz wants to merge 2 commits into
mainfrom
claude/release-workflow
Draft

PetrHeinz wants to merge 2 commits into
mainfrom
claude/release-workflow

Conversation

@PetrHeinz

@PetrHeinz PetrHeinz commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Mirrors the Release workflow of logtail-js and logtail-python: Actions → Release → Run workflow from main, and the workflow runs the tests, builds the gem, pushes it to RubyGems.org with the RUBYGEMS_CREDENTIALS secret, tags the commit vX.Y.Z and creates a GitHub release with generated notes. Re-running a failed release from the same commit finishes it: the push is skipped when the version is on RubyGems.org already, the tag and the release are created if they are still missing.

One difference from the JS and Python workflows: main requires pull requests here, so the workflow cannot commit a version bump the way those do. The bump stays a pull request (step 2 of the manual process) and the workflow refuses to run while lib/*/version.rb still holds a released version. If you would rather have patch/minor inputs that bump and commit, main needs a bypass for GitHub Actions first (a ruleset, or a token with bypass rights); the step itself is small.

Dry run: every push that touches .github/workflows/release.yml runs the tests, builds the gem and checks that the secret looks like a gem credentials file (:rubygems_api_key: rubygems_…), without publishing anything. The run on this pull request is that proof. A dry run can also be dispatched from any branch.

The test job uses gemfiles/rails-8.1.gemfile, the only gemfile with a committed lockfile. The root Gemfile cannot load the suite: the gemspec pins sqlite3 below the version Rails 8.1 needs.

The rubygems environment exists in the repository settings with deployment branches limited to main and no required reviewers, so anyone who can dispatch the workflow can release. Add reviewers there if releases should need an approval.

🤖 Generated with Claude Code

PetrHeinz and others added 2 commits September 25, 2026 16:59
Mirrors the logtail-js and logtail-python release workflows. main requires
pull requests, so the version bump stays a pull request and the workflow
tests, builds, pushes the gem, tags and creates the GitHub release. Every
push touching the workflow file is a dry run. The test job uses the
rails-8.1 gemfile, the only one with a committed lockfile.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The environment restricts deployments to main and has no required
reviewers, so anyone who can dispatch the workflow can release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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