diff --git a/shell/ci/release/dryrun.sh b/shell/ci/release/dryrun.sh index bf9b95f7..44ed113b 100755 --- a/shell/ci/release/dryrun.sh +++ b/shell/ci/release/dryrun.sh @@ -60,9 +60,11 @@ if ! git diff --quiet "$OLD_CIRCLE_BRANCH"; then GITHUB_TOKEN="$(github_token)" if [[ -z $GITHUB_TOKEN ]]; then - warn "Failed to read Github personal access token" >&2 + warn "Failed to read GitHub token" >&2 fi + run_gh auth setup-git + MISE_GITHUB_TOKEN="$GITHUB_TOKEN" GH_TOKEN="$GITHUB_TOKEN" \ yarn --frozen-lockfile semantic-release --dry-run diff --git a/shell/ci/release/pre-release.sh b/shell/ci/release/pre-release.sh index 70356c9a..564d79af 100755 --- a/shell/ci/release/pre-release.sh +++ b/shell/ci/release/pre-release.sh @@ -70,6 +70,8 @@ if [[ $CIRCLE_BRANCH != "$prereleasesBranch" ]] && [[ $DRYRUN == "false" ]]; the exit 0 fi +run_gh auth setup-git + # If we're in dry-run mode, skip creating the release. if [[ $DRYRUN == "true" ]]; then exit 0 @@ -85,7 +87,7 @@ if [[ $COMMIT_MESSAGE =~ "chore: Release" ]]; then # Retrieve the GH_TOKEN GH_TOKEN=$(github_token) if [[ -z $GH_TOKEN ]]; then - echo "Failed to read Github personal access token" >&2 + echo "Failed to read GitHub token" >&2 fi # Unset NPM_TOKEN to force it to use the configured ~/.npmrc NPM_TOKEN='' GH_TOKEN=$GH_TOKEN \ diff --git a/shell/ci/release/release.sh b/shell/ci/release/release.sh index 3a4e6e84..91e55cfa 100755 --- a/shell/ci/release/release.sh +++ b/shell/ci/release/release.sh @@ -14,9 +14,11 @@ source "${LIB_DIR}/logging.sh" # Retrieve the GH_TOKEN GITHUB_TOKEN="$(github_token)" if [[ -z $GITHUB_TOKEN ]]; then - error "Failed to read GitHub personal access token" + error "Failed to read GitHub token" fi +run_gh auth setup-git + send_failure_notification() { if [[ -z $RELEASE_FAILURE_SLACK_CHANNEL ]]; then fatal "Failed to release"