Repository navigation
ci: publish gems with RubyGems trusted publishing - #277
Merged
Merged
Conversation
Replace the static RUBYGEMS_API_KEY secret with RubyGems trusted publishing (OIDC) in release.yml and publish-manual.yml. Both workflows are registered as trusted publishers on rubygems.org, and rubygems/configure-rubygems-credentials exchanges the job's GitHub OIDC token for a short-lived push key. Amp-Thread-ID: https://ampcode.com/threads/T-01a21ccf-6f40-71a7-a04c-06faff4f6bd8 Co-authored-by: Amp <amp@ampcode.com>
christoph-sg
approved these changes
Nov 30, 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.
Replaces the long-lived
RUBYGEMS_API_KEYsecret with RubyGems trusted publishing (OIDC), as part of reducing static credentials in GitHub Actions.Changes
release.yml(create-releasejob) andpublish-manual.ymlnow callrubygems/configure-rubygems-credentials(pinned to v2.2.0). The action exchanges the job's GitHub OIDC token for a short-lived push key and exports it asGEM_HOST_API_KEYforgem push.permissions.id-token: writeis needed for OIDC.contents: write(release) andcontents: read(manual) keep the existinggh releasesteps working, because a job-levelpermissionsblock replaces the default token permissions.Before merging
sourcegraph/scip-ruby, withrelease.ymlandpublish-manual.yml, are configured on scip-ruby. and scip-ruby-debugAfter the first successful release
RUBYGEMS_API_KEYrepo secret and revoke the API key on rubygems.org.Validated with
actionlint. The end-to-end path runs only on the nextscip-ruby-v*tag push, or throughpublish-manual.yml.