Repository navigation
Release with RubyGems trusted publishing - #150
Merged
Merged
Conversation
Add a workflow that runs when a vX.Y.Z tag is pushed. It publishes the gem to RubyGems.org with rubygems/release-gem, which authenticates with trusted publishing instead of an API key, then creates a GitHub release with generated notes. It follows the release workflows in Shopify/rbi and Shopify/spoom. Update RELEASING to describe the tag-based process. Co-authored-by: Hartley McGuire <hartley.mcguire@shopify.com>
hmcguire-shopify
force-pushed
the
sf/fef1a34f-64c1-4dd6-b31c-76f41475d65c
branch
from
November 11, 2026 16:42
a719feb to
7635e06
Compare
hmcguire-shopify
marked this pull request as ready for review
November 11, 2026 16:43
jenshenny
approved these changes
Nov 12, 2026
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.
Adds a release workflow that publishes the gem to RubyGems.org with trusted publishing, so releases no longer need a RubyGems API key or Shipit.
.github/workflows/release.ymlruns when avX.Y.Ztag is pushed. Therelease_gemjob runs in thereleaseenvironment withid-token: writeand usesrubygems/release-gem, which runsrake releasewith short-lived trusted publishing credentials. A second job then creates a GitHub release with generated notes. It follows the release workflows in Shopify/rbi and Shopify/spoom, with actions pinned to the same SHAs.RELEASINGnow describes the tag-based process: bump the version, update the changelog, merge, then push the tag.Before the first tagged release, on RubyGems.org add a trusted publisher for
graphql-metricswith repositoryShopify/graphql-metrics, workflowrelease.ymland environmentrelease. GitHub creates thereleaseenvironment on the first run if it doesn't exist; adding required reviewers or a tag rule to it is a good idea.Tested locally:
actionlintpasses on the workflow, and on Ruby 4.0.9BUNDLE_DEPLOYMENT=true bundle installandrake buildsucceed.