Merged
Conversation
WalkthroughA new GitHub Actions release workflow is introduced to automate gem publishing to RubyGems, while README installation instructions are simplified by removing GitHub and placeholder installation options. Changes
Sequence DiagramsequenceDiagram
actor GitHub
participant GHA as GitHub Actions
participant Bundler
participant RSpec
participant GemBuild as Gem Builder
participant RubyGems
GitHub->>GHA: Release published event
GHA->>GHA: Checkout code
GHA->>Bundler: Setup Ruby 3.2
Bundler->>RSpec: Install dependencies
RSpec->>RSpec: Run tests (bundle exec rspec)
RSpec-->>GHA: Tests passed
GHA->>GemBuild: Build gem (gem build data_nexus.gemspec)
GemBuild-->>GHA: Gem artifact created
GHA->>RubyGems: Push gem with API key
RubyGems-->>GHA: Gem published
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/release.yml:
- Around line 23-27: Add a guard step before the "Build gem" step that reads the
gem version from data_nexus.gemspec (e.g., using a small Ruby one-liner or grep)
and compares it to github.event.release.tag_name, and fail the job if they don't
match; implement this check as a new workflow step (e.g., "Verify release tag
matches gemspec") placed prior to running "Build gem" and "Push to RubyGems" so
the pipeline stops on mismatch.
- Around line 23-27: The workflow currently uses a wildcard in the "Push to
RubyGems" step (run: gem push data_nexus-*.gem) which can select the wrong
artifact; modify the "Build gem" step (run: gem build data_nexus.gemspec) to
capture the exact filename produced (e.g., parse the build output or list the
created file) and expose it as an output or environment variable, then update
the "Push to RubyGems" step to push that explicit filename (use the captured
variable instead of data_nexus-*.gem) so only the intended gem artifact is
uploaded.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
12-18: Consider pinning GitHub Actions to commit SHAs.
This improves supply-chain integrity for release publishing workflows.
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.
No description provided.