Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ...
- `script/release` accepts `--otp CODE` and forwards it to `gem push` via `GEM_HOST_OTP_CODE`, so a TOTP code can stand in for the WebAuthn browser handoff.

## [0.4.0] - 2026-09-24

Expand Down
22 changes: 22 additions & 0 deletions script/release
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#!/bin/sh
# Tag and push a release to RubyGems and npm
#
# Usage: script/release [--otp CODE]
#
# --otp CODE Six-digit code from your RubyGems TOTP authenticator. Passing it
# skips the WebAuthn browser handoff that `gem push` otherwise
# requires when MFA is enabled on the account.

set -e

case "$1" in
--otp)
[ -n "$2" ] || { echo "Usage: script/release [--otp CODE]"; exit 1; }
export GEM_HOST_OTP_CODE="$2"
;;
--otp=*)
export GEM_HOST_OTP_CODE="${1#--otp=}"
;;
"")
;;
*)
echo "Usage: script/release [--otp CODE]"
exit 1
;;
esac

# Fail fast before the gem publish if npm credentials are missing.
npm whoami > /dev/null 2>&1 || { echo "Not logged in to npm. Run 'npm login' first."; exit 1; }

Expand Down
Loading