You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(gem-release): fail loudly on push errors; add credential-test toggle
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>
Copy file name to clipboardExpand all lines: .github/workflows/release-sdk-gem.yml
+45-8Lines changed: 45 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,11 @@ on:
13
13
tag:
14
14
description: "Release tag (e.g. v0.3.35)"
15
15
required: true
16
+
force_push_existing:
17
+
description: "Attempt the push even if this version is already on RubyGems. Credential test only — RubyGems rejects re-push, so no new release is created."
18
+
type: boolean
19
+
default: false
20
+
required: false
16
21
17
22
permissions:
18
23
contents: read
@@ -206,7 +211,10 @@ jobs:
206
211
id: rubygems-check
207
212
shell: bash
208
213
run: |
209
-
if curl -fsS \
214
+
if [[ "${{ github.event.inputs.force_push_existing }}" == "true" ]]; then
215
+
echo "force_push_existing is set — running the push even if the version exists (credential test)."
0 commit comments