Skip to content

Commit d0bb527

Browse files
committed
Test in the CI that release version is matching the tag. For nightly builds ensure correct pattern is used
1 parent 2b1b093 commit d0bb527

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,13 @@ jobs:
663663
echo "This build version: $ver"
664664
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
665665
666+
- name: Check is version matching pattern
667+
run: |
668+
if ! grep -Eo "3\.[0-9]+\.[0-9]+-RC[0-9]+-bin-[0-9]{8}-[a-zA-Z0-9]{7}-NIGHTLY" <<< "${{ env.THISBUILD_VERSION }}"; then
669+
echo "Version used by compiler to publish nightly release does not match expected pattern"
670+
exit 1
671+
fi
672+
666673
- name: Check whether not yet published
667674
id: not_yet_published
668675
continue-on-error: true
@@ -766,6 +773,16 @@ jobs:
766773
- name: Extract the release tag
767774
run : echo "RELEASE_TAG=${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV
768775

776+
- name: Check compiler version
777+
shell: bash
778+
run : |
779+
version=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
780+
echo "This build version: ${version}"
781+
if [ "${version}" != "${{ env.RELEASE_TAG }}" ]; then
782+
echo "Compiler version for this build '${version}', does not match tag: ${{ env.RELEASE_TAG }}"
783+
exit 1
784+
fi
785+
769786
- name: Prepare the SDKs
770787
shell: bash
771788
run : |

0 commit comments

Comments
 (0)