We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 373b88d commit 4aeab9dCopy full SHA for 4aeab9d
.github/workflows/main.yml
@@ -57,7 +57,7 @@ jobs:
57
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
58
# TODO: If it is possible to accept input in the middle of a step, then the OTP Token should be inputted instead of generated.
59
gem install rotp -v 6.2.0
60
- OTP_TOKEN=$(ruby -rtime -rrotp -e "puts ROTP::TOTP.new('${OTP_SECRET}', issuer: 'rubygems.org').at(Time.now)")
+ OTP_TOKEN=$(echo ${OTP_SECRET} | ruby -rtime -rrotp -e "puts ROTP::TOTP.new(STDIN.read.chomp, issuer: 'rubygems.org').at(Time.now)")
61
gem push --otp="${OTP_TOKEN}" ./build/gems/*.gem
62
env:
63
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
0 commit comments