Skip to content

Add RubyGems trusted publishing to the release workflow - #192

Merged
rafaelfranca merged 2 commits into
Shopify:mainfrom
rafaelfranca:add-rubygems-trusted-publishing
Oct 8, 2026
Merged

rafaelfranca merged 2 commits into
Shopify:mainfrom
rafaelfranca:add-rubygems-trusted-publishing

Conversation

@rafaelfranca

@rafaelfranca rafaelfranca commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Add id-token: write to the release job.
  • Set the release job environment to release.
  • Use the pinned rubygems/configure-rubygems-credentials action for OIDC authentication.
  • Publish the existing gem after the GitHub asset upload.
  • Replace the manual release instructions with the trusted publisher configuration.

Verification

  • actionlint 1.7.7 passed for .github/workflows/release.yml.
  • The pinned action completed an OIDC exchange with a local server.
  • Ruby 2.7.3 executed the workflow's gem push command with the resulting token.
  • The local server verified the authorization header and the exact release gem bytes.
  • The check did not publish a gem to RubyGems.org.

Required setup

Before the next release, a gem owner must register a trusted publisher for ejson2env.

  • Repository owner: Shopify
  • Repository name: ejson2env
  • Workflow filename: release.yml
  • Environment: release

The workflow does not require a RubyGems API token in the repository secrets.

@shane-lawrence shane-lawrence left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rafaelfranca!

@rafaelfranca
rafaelfranca merged commit 17c604b into Shopify:main Oct 8, 2026
2 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