Skip to content

Release with RubyGems trusted publishing - #150

Merged
hmcguire-shopify merged 1 commit into
mainfrom
sf/fef1a34f-64c1-4dd6-b31c-76f41475d65c
Nov 13, 2026
Merged

hmcguire-shopify merged 1 commit into
mainfrom
sf/fef1a34f-64c1-4dd6-b31c-76f41475d65c

Conversation

@hmcguire-shopify

@hmcguire-shopify hmcguire-shopify commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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.yml runs when a vX.Y.Z tag is pushed. The release_gem job runs in the release environment with id-token: write and uses rubygems/release-gem, which runs rake release with 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.
  • RELEASING now 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-metrics with repository Shopify/graphql-metrics, workflow release.yml and environment release. GitHub creates the release environment on the first run if it doesn't exist; adding required reviewers or a tag rule to it is a good idea.

Tested locally: actionlint passes on the workflow, and on Ruby 4.0.9 BUNDLE_DEPLOYMENT=true bundle install and rake build succeed.

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
hmcguire-shopify force-pushed the sf/fef1a34f-64c1-4dd6-b31c-76f41475d65c branch from a719feb to 7635e06 Compare November 11, 2026 16:42
@hmcguire-shopify
hmcguire-shopify marked this pull request as ready for review November 11, 2026 16:43
@hmcguire-shopify
hmcguire-shopify merged commit 856114c into main Nov 13, 2026
14 checks passed
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