Skip to content

Commit d6b1fd2

Browse files
committed
Skip Bundler source-control tasks in CI to fix release workflow
The rubygems/release-gem action runs `rake release`, which tries to create and push a git tag. This fails because the bump job already created the tag. Clear the guard_clean and source_control_push tasks in CI so `rake release` only builds and pushes the gem. https://claude.ai/code/session_01CvCNpdSjh1STBdmS9n5DN9
1 parent 82a68db commit d6b1fd2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Rakefile‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# frozen_string_literal: true
22

33
require "bundler/gem_tasks"
4+
5+
# In CI the release workflow already handles tags via the bump job,
6+
# so skip Bundler's source-control tasks to avoid "tag already exists" errors.
7+
if ENV["CI"]
8+
Rake::Task["release:guard_clean"].clear
9+
task "release:guard_clean"
10+
Rake::Task["release:source_control_push"].clear
11+
task "release:source_control_push"
12+
end
13+
414
require "rake/testtask"
515

616
Rake::TestTask.new(:test) do |t|

0 commit comments

Comments
 (0)