Use rake release with Github

13
October, 2021

Manual

gem push \
  --key github \
  --host https://rubygems.pkg.github.com/USERNAME/GEMNAME \
  GEMNAME-1.0.0.gem

With rake release

# Add credentials
echo ":github: Bearer ${GH_TOKEN}" >> ~/.gem/credentials

# Define key for gem release
bundle config set --global gem.push_key github

# Release gem
rake release