Release the gems from a workflow - #3047
Merged
Merged
Conversation
soutaro
force-pushed
the
build-gems-workflow
branch
from
July 30, 2026 03:32
15bbf51 to
be56733
Compare
`docs/release.md` had the maintainer build both gems locally and push them by hand: `rake release` for the `ruby` one, and a Docker image for the `java` one because it needs the WASI SDK to compile `rbs_parser.wasm`. That is a lot of laptop for something that has to be reproducible, and it puts the RubyGems credentials of whoever runs it in the path. `Release gems` does it instead. Dispatched against a `vX.Y.Z` tag it builds both gems, checks them, pushes them to RubyGems through trusted publishing, and publishes the GitHub release. A release is now a pull request, a tag, and one workflow run. The `java` gem is built on CRuby rather than in the JRuby image: the platform comes from `RBS_PLATFORM`, not from the engine running `gem build`, so all the image was providing is the WASI SDK -- which the `wasm` and `jruby` workflows already install directly. JRuby is still needed to *run* the result, so the workflow installs the built gem on JRuby and parses with it. That is the check metadata cannot make: a stale or broken wasm module only shows at require time. Publishing is ordered so that the reversible step always comes first. The tag is created before the workflow runs; the artifacts are uploaded before the push, so a failed push still leaves the gems behind; and the GitHub release comes last, so a failed push never announces a release that has no gems. The trusted publisher has no environment, so the dispatched ref is the only thing deciding what gets published. The workflow refuses to publish unless the tag matches `RBS::VERSION`, and dispatching against a branch builds and stops. `gem:gh_release` takes the notes from the topmost CHANGELOG.md section and is skipped for `.dev.N` versions, which are cut from the development line and are not written up. It reads the file as UTF-8 explicitly: the default external encoding follows the locale, which is C on the runners. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
soutaro
force-pushed
the
build-gems-workflow
branch
from
July 30, 2026 07:31
d7ac3da to
38f6990
Compare
soutaro
marked this pull request as ready for review
July 30, 2026 07:31
soutaro
enabled auto-merge
July 30, 2026 07:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building both gems and pushing them by hand —
rake releasefor therubyone, a Docker image for thejavaone because it needs the WASI SDK — moves to aRelease gemsworkflow: dispatched against avX.Y.Ztag it builds both gems, installs thejavaone on JRuby and parses with it, pushes both to RubyGems through trusted publishing, and publishes the GitHub release.A release is now a pull request, a tag, and one workflow run;
docs/release.mdis rewritten around that, including what the three kinds of release (X.Y.Z,.pre.N,.dev.N) each get written up as.