We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc8126f commit 11bd174Copy full SHA for 11bd174
scripts/release.sh
@@ -113,6 +113,18 @@ done
113
# Check dependencies.
114
dependencies gh jq sort
115
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.com 2>/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
+
128
if [[ -z $increment ]]; then
129
# Default to patch versions.
130
increment="patch"
0 commit comments