Skip to content

Commit

Permalink
Add MFA support
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewelsby committed Jun 29, 2024
1 parent a4ea65d commit c07bd1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,21 @@ jobs:
bundle install
- name: Build Gem 📦
run: gem build *.gemspec
- name: Install OTP CLI 📱
run: |
sudo apt-get update
sudo apt-get install -y oathtool
- name: Publish Gem 🚀
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > $HOME/.gem/credentials
gem push *.gem
OTP=$(oathtool --totp --base32 $RUBYGEMS_OTP_SECRET)
gem push --verbose --otp=$OTP *.gem
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
RUBYGEMS_OTP_SECRET: ${{ secrets.RUBYGEMS_OTP_SECRET }}



0 comments on commit c07bd1d

Please sign in to comment.