Skip to content

Commit

Permalink
Updated the Rakefile to publish packages to the Github registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
evolve75 committed Dec 20, 2024
1 parent 54f8486 commit 9ee7517
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Rakefile - This file is part of the RubyTree package.
#
# Copyright (c) 2006-2022 Anupam Sengupta
# Copyright (c) 2006-2024 Anupam Sengupta
#
# All rights reserved.
#
Expand Down Expand Up @@ -160,9 +160,16 @@ namespace :gem do
pkg.need_tar = true
end

desc 'Push the gem into the Rubygems repository'
desc 'Push the gem into the Rubygems and Github repositories'
task push: :gem do
github_repo = 'https://rubygems.pkg.github.com/evolve75'

# This pushes to the standard RubyGems registry
sh "gem push pkg/#{GEM_NAME}"

# For github, the credentials key is assumed to be github
# See: https://docs.github.com/en/packages/working-with-a-github-packages-registry/
sh "gem push --key github --host #{github_repo} pkg/#{GEM_NAME}"
end
end

Expand Down

0 comments on commit 9ee7517

Please sign in to comment.