Fix release workflow to use OIDC credentials directly#428
Closed
gjtorikian wants to merge 1 commit intomainfrom
Closed
Fix release workflow to use OIDC credentials directly#428gjtorikian wants to merge 1 commit intomainfrom
gjtorikian wants to merge 1 commit intomainfrom
Conversation
Replace rubygems/release-gem with manual build and push to avoid the rake release task attempting git operations (which fails due to insufficient permissions in the publish job). - Use rubygems/configure-rubygems-credentials for OIDC auth - Run rake build to create the gem without git operations - Push directly with gem push Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryReplaced the
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PR as Pull Request (merged)
participant GH as GitHub Actions
participant CreateRelease as create-release job
participant Publish as publish job
participant RubyGems as RubyGems.org
PR->>GH: Trigger on PR merge with version-bump label
GH->>CreateRelease: Start job
CreateRelease->>CreateRelease: Generate GitHub App token
CreateRelease->>CreateRelease: Checkout code
CreateRelease->>CreateRelease: Extract version from version.rb
CreateRelease->>CreateRelease: Create GitHub release with tag
CreateRelease->>Publish: Pass version via outputs
GH->>Publish: Start job (needs create-release)
Publish->>RubyGems: Configure OIDC credentials
RubyGems->>Publish: Return authentication token
Publish->>Publish: Checkout code
Publish->>Publish: Setup Ruby 3.2 with bundler cache
Publish->>Publish: Run RSpec tests
Publish->>Publish: Run rake build (creates gem in pkg/)
Publish->>RubyGems: Push gem using OIDC auth
RubyGems->>Publish: Confirm publish success
|
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.
Summary
rubygems/release-gemwith manual build and pushrubygems/configure-rubygems-credentialsfor OIDC authenticationrake buildinstead ofrake releaseto avoid git operationsProblem
The
rubygems/release-gemaction runsbundle exec rake release, which includesrelease:source_control_pushthat tries to push git tags. The publish job only hascontents: readpermission, causing the workflow to fail with:The previous fix attempted to use a
gem-push-commandinput, but that input doesn't exist in therubygems/release-gemaction.Solution
Use
rubygems/configure-rubygems-credentialsto set up OIDC auth, then manually:bundle exec rake build- builds the gem without git operationsgem push- pushes to RubyGemsTest plan
🤖 Generated with Claude Code