-
Notifications
You must be signed in to change notification settings - Fork 0
K1bs/automate release #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
fastjames
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
No description provided.