Skip to content

Commit 72cef7a

Browse files
committed
Add CI check to ensure RELEASE_TAG matches compiler version
1 parent 3e2b75b commit 72cef7a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,18 @@ jobs:
766766
- name: Extract the release tag
767767
run : echo "RELEASE_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV
768768

769+
- name: Check compiler version
770+
shell: bash
771+
run : |
772+
# Pipe through xargs to remove whitespaces
773+
version=$(sbt "scala3-compiler-bootstrapped/version" | grep -oEh "3\.\d+\.\d+([-a-zA-Z1-9]+)?" | xargs)
774+
if [ "${version}" = "${{ env.RELEASE_TAG }}" ]; then
775+
echo "Compiler version '${version}' matches tag: ${{ env.RELEASE_TAG }}"
776+
else
777+
echo "Invalid compiler version '${version}', does not match tag: ${{ env.RELEASE_TAG }}"
778+
exit 1
779+
fi
780+
769781
- name: Prepare the SDKs
770782
shell: bash
771783
run : |

0 commit comments

Comments
 (0)