Skip to content

Commit 18064d0

Browse files
committed
chore: allow manual release script to use gh auth token
1 parent 060704d commit 18064d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/publish-release.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -euo pipefail
44

55
token="${NODE_AUTH_TOKEN:-${GITHUB_TOKEN:-${GH_TOKEN:-}}}"
66

7+
if [[ -z "$token" ]] && command -v gh >/dev/null 2>&1; then
8+
token="$(gh auth token 2>/dev/null || true)"
9+
fi
10+
711
if [[ -z "$token" ]]; then
812
echo "Missing auth token. Set NODE_AUTH_TOKEN, GITHUB_TOKEN, or GH_TOKEN."
913
exit 1

0 commit comments

Comments
 (0)