Repository navigation
ci: Leave tagging to release-please when publishing the gem - #31
Merged
Merged
Conversation
release-please creates and pushes the release tag itself. rake release then tries to tag and push the same version again. The checkout in the release job has no tags, so Bundler doesn't see the existing one, the push is rejected, and rake stops before pushing the gem. release:rubygem_push depends on build, so it still builds the gem and runs any build prerequisites, then pushes it without touching git.
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.
Description
bundle exec rake releasebuilds the gem, then tags and pushes the tag, then pushes the gem. release-please has already pushed the tag by the time the publish job runs, and the job's checkout doesn't include tags. So Bundler tags again, the push is rejected withv… -> v… (already exists), and rake stops before the gem push.The publish job now runs
bundle exec rake release:rubygem_pushinstead. That task depends onbuild, so it still builds the gem and runs any build prerequisites, then pushes it to RubyGems without touching git.The 1.0.0 run failed earlier, at
check_version, so this step was never reached. Merging the 1.0.1 release PR (#30) without this change would fail at the tag push.gem-push.ymlis unchanged. It checks out the tag, so Bundler sees the tag already exists and skips the push.Posted by Claude on behalf of @anakinj.