Skip to content

Commit ea51eee

Browse files
Merge pull request #12 from ionos-cloud/bugfix/gem-release-flow-10
Refactor CI workflow to remove git operations during gem release
2 parents c6c6315 + 045d3ce commit ea51eee

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ jobs:
123123
run: bundle install
124124

125125
- name: Update version from git tag
126-
run: |
127-
bundle exec rake version
128-
git config user.name "github-actions[bot]"
129-
git config user.email "github-actions[bot]@users.noreply.github.com"
130-
git add lib/archsight/version.rb
131-
git commit -m "Release ${GITHUB_REF#refs/tags/}"
126+
run: bundle exec rake version
132127

133128
- name: Build and publish gem
134129
uses: rubygems/release-gem@v1

Rakefile

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

33
require "bundler/gem_tasks"
4+
5+
# Override release tasks to skip git operations in CI
6+
if ENV["CI"]
7+
Rake::Task["release:guard_clean"].clear
8+
Rake::Task["release:source_control_push"].clear
9+
end
10+
411
require "minitest/test_task"
512

613
Minitest::TestTask.create

0 commit comments

Comments
 (0)