diff --git a/.github/workflows/release_notes_template.txt b/.github/workflows/release_notes_template.txt index 6b7f685f..5c19cb80 100644 --- a/.github/workflows/release_notes_template.txt +++ b/.github/workflows/release_notes_template.txt @@ -5,6 +5,15 @@ If you're using `bzlmod`, add the following to `MODULE.bazel`: ```starlark bazel_dep(name = "toolchains_llvm", version = "{tag}") +# To directly use a commit from GitHub, replace commit with the commit you want. +# Otherwise, omit this block. +git_override( + module_name = "toolchains_llvm", + commit = "{commit}", + remote = "https://github.com/grailbio/bazel-toolchain", +) + +# Configure and register the toolchain. llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") llvm.toolchain( llvm_version = "16.0.0", diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 08eb0618..a5afc2df 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -7,7 +7,8 @@ git config user.name "Your Name" # Set by GH actions, see # https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables -tag=${GITHUB_REF_NAME} +tag="${GITHUB_REF_NAME}" +commit="${GITHUB_SHA}" # The prefix is chosen to match what GitHub generates for source archives prefix="toolchains_llvm-${tag}" archive="toolchains_llvm-${tag}.tar.gz" @@ -17,6 +18,7 @@ sha=$(shasum -a 256 "${archive}" | cut -f1 -d' ') sed \ -e "s/{tag}/${tag}/g" \ + -e "s/{commit}/${commit}/g" \ -e "s/{prefix}/${prefix}/g" \ -e "s/{archive}/${archive}/g" \ -e "s/{sha}/${sha}/g" \