Skip to content

ci: harden gem release + add RubyGems key verification#36

Closed
setoelkahfi wants to merge 4 commits into
developmentfrom
feature/ci-ruby-gems
Closed

ci: harden gem release + add RubyGems key verification#36
setoelkahfi wants to merge 4 commits into
developmentfrom
feature/ci-ruby-gems

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

Why

The gem release workflow reported green while publishing nothing: gem push failures (including a 401 from a missing RUBYGEMS_API_KEY secret) were swallowed by || echo "...may already exist..." and the job exited 0. That's why smbcloud-auth is still at 0.3.35 on RubyGems despite v0.4.0–v0.4.3 "succeeding".

Changes

  • release-sdk-gem.yml
    • Credentials step fails fast if RUBYGEMS_API_KEY is empty/unset.
    • Push step only skips a genuine "Repushing of gem versions is not allowed" response; any other failure fails the job (401, validation, 5xx).
    • New force_push_existing dispatch input to attempt a push against an already-published version for credential testing (RubyGems rejects the re-push, so no new release is created).
  • verify-rubygems-key.yml (new) — fast, no-build/no-publish check that the secret authenticates with RubyGems.

Note

The 0.3.x tags can't be rebuilt on the current pipeline (the smbcloud-auth-sdk crate was split out at 0.4, so smbcloud-auth-sdk 0.3.x 404s on crates.io and the crate-wait step times out). Use verify-rubygems-key.yml to validate the key, then cut 0.4.3.

🤖 Generated with Claude Code

keypair34 and others added 4 commits June 17, 2026 15:48
The push step swallowed every gem push failure as "may already exist"
and exited 0, so a 401 from a missing RUBYGEMS_API_KEY looked like a
successful, no-op release (v0.4.0–v0.4.3 reported green but published
nothing). Now:

- credentials step fails fast if RUBYGEMS_API_KEY is empty/unset
- push step only skips a genuine "Repushing not allowed" response and
  fails the job on any other error (401, validation, 5xx)
- new force_push_existing dispatch input runs the push against an
  already-published version to verify credentials without creating a
  new release (RubyGems rejects the re-push)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Validates the RUBYGEMS_API_KEY secret authenticates with RubyGems
without building or publishing a gem. The release workflow builds
native gems before pushing, so it is a slow and tag-coupled way to
discover a bad/missing key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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