Skip to content

Commit a9625a2

Browse files
committed
Fix and future-proof the CI release scripts (#21810)
- Forward-ports changes to `publish_release` CI job from `release-3.6.1` branch. * Fix building SDK archives, don't use `build-sdk-packages` job that produced artifacts in SNAPSHOT version * Fix typos introduced in template (forward port from `release-3.6.0`) - Detect and check version used to publish artifacts: * For release builds ensure that `version` is always matching tag used to trigger CI job * For nightly builds ensure that `version` is following the expected pattern [Cherry-picked 34f1c54][modified]
1 parent 19016d2 commit a9625a2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: .github/workflows/ci.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,13 @@ jobs:
580580
echo "This build version: $ver"
581581
echo "THISBUILD_VERSION=$ver" >> $GITHUB_ENV
582582
583+
- name: Check is version matching pattern
584+
run: |
585+
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
586+
echo "Version used by compiler to publish nightly release does not match expected pattern"
587+
exit 1
588+
fi
589+
583590
- name: Check whether not yet published
584591
id: not_yet_published
585592
continue-on-error: true
@@ -685,6 +692,16 @@ jobs:
685692
- name: Add SBT proxy repositories
686693
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
687694

695+
- name: Check compiler version
696+
shell: bash
697+
run : |
698+
version=$(./project/scripts/sbt "print scala3-compiler-bootstrapped/version" | tail -n1)
699+
echo "This build version: ${version}"
700+
if [ "${version}" != "${{ env.RELEASE_TAG }}" ]; then
701+
echo "Compiler version for this build '${version}', does not match tag: ${{ env.RELEASE_TAG }}"
702+
exit 1
703+
fi
704+
688705
- name: Prepare Release
689706
run: |
690707
./project/scripts/sbt dist/packArchive

0 commit comments

Comments
 (0)