Skip to content

Commit 9ee7517

Browse files
committed
Updated the Rakefile to publish packages to the Github registry.
Registry: <https://github.com/evolve75/RubyTree/pkgs/rubygems/rubytree>
1 parent 54f8486 commit 9ee7517

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Rakefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Rakefile - This file is part of the RubyTree package.
44
#
5-
# Copyright (c) 2006-2022 Anupam Sengupta
5+
# Copyright (c) 2006-2024 Anupam Sengupta
66
#
77
# All rights reserved.
88
#
@@ -160,9 +160,16 @@ namespace :gem do
160160
pkg.need_tar = true
161161
end
162162

163-
desc 'Push the gem into the Rubygems repository'
163+
desc 'Push the gem into the Rubygems and Github repositories'
164164
task push: :gem do
165+
github_repo = 'https://rubygems.pkg.github.com/evolve75'
166+
167+
# This pushes to the standard RubyGems registry
165168
sh "gem push pkg/#{GEM_NAME}"
169+
170+
# For github, the credentials key is assumed to be github
171+
# See: https://docs.github.com/en/packages/working-with-a-github-packages-registry/
172+
sh "gem push --key github --host #{github_repo} pkg/#{GEM_NAME}"
166173
end
167174
end
168175

0 commit comments

Comments
 (0)