foo
diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 474d352..ac0f166 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh
@@ -5,18 +5,22 @@ set -euo pipefail tag="$1" +# GITHUB_REPOSITORY looks like user/repository_name, let strip the user part. +repository=${GITHUB_REPOSITORY#*/} # The prefix is used to determine the directory structure of the archive. We strip the 'v' # prefix from the version number. -directory="j2cl-${tag#v}" -archive="j2cl-${tag}.tar.gz" +directory="${repository}-${tag#v}" +archive="${repository}-${tag}.tar.gz" git archive --format=tar --prefix=${directory}/ -o "${archive}" ${tag} +# Our github repo use '-' to seperate word when our bazel module use '_' +bazel_module_name="${repository//-/_}" # The stdout of this program will be used as the top of the release notes for this release. cat << EOF ## Using Bazel 8 or later, add to your \`MODULE.bazel\` file: \`\`\`starlark -bazel_dep(name = "j2cl", version = "${tag}") +bazel_dep(name = "${bazel_module_name}", version = "${tag}") \`\`\` EOF