Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5fb2317

Browse files
authored
chore(scripts): add custom gh auth to release script (#13396)
1 parent9ae825e commit5fb2317

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎scripts/release.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ done
113113
# Check dependencies.
114114
dependencies gh jq sort
115115

116+
# Authenticate gh CLI.
117+
# NOTE: Coder external-auth won't work because the GitHub App lacks permissions.
118+
if [[-z${GITHUB_TOKEN:-} ]];then
119+
if [[-n${GH_TOKEN:-} ]];then
120+
export GITHUB_TOKEN=${GH_TOKEN}
121+
elif token="$(gh auth token --hostname github.com2>/dev/null)";then
122+
export GITHUB_TOKEN=${token}
123+
else
124+
error"GitHub authentication is required to run this command, please set GITHUB_TOKEN or run 'gh auth login'."
125+
fi
126+
fi
127+
116128
if [[-z$increment ]];then
117129
# Default to patch versions.
118130
increment="patch"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp