ci: fail the release when the gem does not reach RubyGems - #16
Merged
Merged
Conversation
actionshub/publish-gem-to-rubygems logs a rejected push and still exits 0, so a release that never got published shows up as a green job. 0.2.0 hit exactly that: tagged, released on GitHub, pushed to GitHub Packages, workflow green, and RubyGems still on 0.1.4. The push had been rejected with "You do not have permission to push to this gem", in a step that reported success. Ask RubyGems whether the version is actually there. The v2 endpoint 404s until that exact version is indexed, so curl -f turns "not there" into a non-zero exit without the substring matching a `gem list` grep would need. Signed-off-by: Tim Smith <tsmith84@proton.me>
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.
0.2.0 was tagged, released on GitHub, and pushed to GitHub Packages, and the
Release workflow went green — but RubyGems is still on 0.1.4. The push had been
rejected:
actionshub/publish-gem-to-rubygemslogs that and exits 0, so the step reportedsuccess and nothing surfaced the broken release.
This asks RubyGems whether the version actually landed. The v2 versions endpoint
404s until that exact version is indexed, so
curl -fturns "not there" into anon-zero exit — without the substring matching a
gem list | grepwould need,where
0.2.0would also match10.2.0.The same guard is on the five sibling pull requests and on test-kitchen/busser-bats#50.