Skip to content

Commit 8b037a9

Browse files
authored
Fix rules_java release pipeline config (#2137)
This enables making releases at specific points even if the branch has moved ahead. Before this change, the release would always be made at the HEAD of chosen branch, we should instead to do so at the specific commit that the workflow is executed on.
1 parent cf6309a commit 8b037a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipelines/rules_java-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ steps:
2828
command: |
2929
echo "+++ Checking out Git branch"
3030
git fetch origin ${BUILDKITE_BRANCH}
31-
git checkout ${BUILDKITE_BRANCH}
31+
git checkout ${BUILDKITE_COMMIT}
3232
3333
echo "+++ Getting the latest rules_java version"
3434
contents=$(cat MODULE.bazel)
@@ -53,4 +53,4 @@ steps:
5353
echo "+++ Creating a release on GitHub"
5454
cd bazel-bin/distro
5555
relnotes=$(cat relnotes.txt)
56-
GITHUB_TOKEN=\${github_token} github-release "bazelbuild/rules_java" \${version} "\${BUILDKITE_BRANCH}" "\${relnotes}" rules_java-\${version}.tar.gz
56+
GITHUB_TOKEN=\${github_token} github-release "bazelbuild/rules_java" \${version} "\${BUILDKITE_COMMIT}" "\${relnotes}" rules_java-\${version}.tar.gz

0 commit comments

Comments
 (0)