Skip to content

Commit

Permalink
Publish RCs to GitHub
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 602440856
Change-Id: I5c1a3c4ba3fa70d1ea928ad3d23f472da7af65d7
  • Loading branch information
keertk authored and copybara-github committed Jan 29, 2024
1 parent d3a8298 commit 275000c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,16 @@ function release_to_github() {

local release_name=$(get_release_name)
local rc=$(get_release_candidate)
local full_release_name=$(get_full_release_name)

if [ -n "${release_name}" ] && [ -z "${rc}" ]; then
if [ -n "${release_name}" ]; then
local github_token="$(gsutil cat gs://bazel-trusted-encrypted-secrets/github-trusted-token.enc | \
gcloud kms decrypt --project bazel-public --location global --keyring buildkite --key github-trusted-token --ciphertext-file - --plaintext-file -)"

GITHUB_TOKEN="${github_token}" github-release "bazelbuild/bazel" "${release_name}" "" "$(get_release_page)" "${artifact_dir}/*"
if [ -z "${rc}" ]; then
GITHUB_TOKEN="${github_token}" github-release "bazelbuild/bazel" "${release_name}" "" "$(get_release_page)" "${artifact_dir}/*"
else
GITHUB_TOKEN="${github_token}" github-release -prerelease "bazelbuild/bazel" "${full_release_name}" "" "$(get_release_page)" "${artifact_dir}/*"
fi
fi
}

Expand Down

0 comments on commit 275000c

Please sign in to comment.