@@ -729,7 +729,7 @@ jobs:
729729 - ${{ github.workspace }}/../../cache/sbt:/root/.sbt
730730 - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
731731 - ${{ github.workspace }}/../../cache/general:/root/.cache
732- needs : [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8, build-sdk-package]
732+ needs : [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8, build-sdk-package, build-msi-package ]
733733 if : " github.event_name == 'push'
734734 && startsWith(github.event.ref, 'refs/tags/')"
735735
@@ -812,6 +812,18 @@ jobs:
812812 prepareSDK "-x86_64-apple-darwin" "dist-mac-x86_64" "./dist/mac-x86_64/"
813813 prepareSDK "-x86_64-pc-win32" "dist-win-x86_64" "./dist/win-x86_64/"
814814
815+ - name : Download MSI package
816+ uses : actions/download-artifact@v4
817+ with :
818+ name : scala.msi
819+ path : .
820+ - name : Prepare MSI package
821+ shell : bash
822+ run : |
823+ msiInstaller="scala3-${{ env.RELEASE_TAG }}.msi"
824+ mv scala.msi "${msiInstaller}"
825+ sha256sum "${msiInstaller}" > "${msiInstaller}.sha256"
826+
815827 # Create the GitHub release
816828 - name : Create GitHub Release
817829 id : create_gh_release
@@ -825,10 +837,10 @@ jobs:
825837 draft : true
826838 prerelease : ${{ contains(env.RELEASE_TAG, '-') }}
827839
828- # The following steps are generated using template:
829- # def template(distribution: String, suffix: String) =
830- # def upload(kind: String, path: String, contentType: String) =
831- # s"""- name: Upload $kind to GitHub Release ($distribution)
840+ # The following upload steps are generated using template:
841+ # val baseFileName = "scala3-${{ env.RELEASE_TAG }}"
842+ # def upload(kind: String, path: String, contentType: String, distribution : String) =
843+ # s"""- name: Upload $kind to GitHub Release ($distribution)
832844 # uses: actions/upload-release-asset@v1
833845 # env:
834846 # GITHUB_TOKEN: $${{ secrets.GITHUB_TOKEN }}
@@ -837,24 +849,33 @@ jobs:
837849 # asset_path: ./${path}
838850 # asset_name: ${path}
839851 # asset_content_type: ${contentType}"""
840- # val filename = s"scala3-$${{ env.RELEASE_TAG }}${suffix}"
852+ # def uploadSDK(distribution: String, suffix: String) =
853+ # val filename = s"${baseFileName}${suffix}"
841854 # s"""
842855 # # $distribution
843- # ${upload("zip archive", s"$filename.zip", "application/zip")}
844- # ${upload("zip archive SHA", s"$filename.zip.sha256", "text/plain")}
845- # ${upload("tar.gz archive", s"$filename.tar.gz", "application/gzip")}
846- # ${upload("tar.gz archive SHA", s"$filename.tar.gz.sha256", "text/plain")}
856+ # ${upload("zip archive", s"$filename.zip", "application/zip", distribution)}
857+ # ${upload("zip archive SHA", s"$filename.zip.sha256", "text/plain", distribution)}
858+ # ${upload("tar.gz archive", s"$filename.tar.gz", "application/gzip", distribution)}
859+ # ${upload("tar.gz archive SHA", s"$filename.tar.gz.sha256", "text/plain", distribution)}
860+ # """
861+ # def uploadMSI() =
862+ # val distribution = "Windows x86_64 MSI"
863+ # s"""
864+ # # $distribution
865+ # ${upload(".msi file", s"${baseFileName}.msi", "application/x-msi", distribution)}
866+ # ${upload(".msi file SHA", s"${baseFileName}.msi.sha256", "text/plain", distribution)}
847867 # """
848-
849868 # @main def gen =
850869 # Seq(
851- # template("Universal", ""),
852- # template("Linux x86-64", "-x86_64-pc-linux"),
853- # template("Linux aarch64", "-aarch64-pc-linux"),
854- # template("Mac x86-64", "-x86_64-apple-darwin"),
855- # template("Mac aarch64", "-aarch64-apple-darwin"),
856- # template("Windows x86_64", "-x86_64-pc-win32")
870+ # uploadSDK("Universal", ""),
871+ # uploadSDK("Linux x86-64", "-x86_64-pc-linux"),
872+ # uploadSDK("Linux aarch64", "-aarch64-pc-linux"),
873+ # uploadSDK("Mac x86-64", "-x86_64-apple-darwin"),
874+ # uploadSDK("Mac aarch64", "-aarch64-apple-darwin"),
875+ # uploadSDK("Windows x86_64", "-x86_64-pc-win32"),
876+ # uploadMSI()
857877 # ).foreach(println)
878+
858879 # Universal
859880 - name : Upload zip archive to GitHub Release (Universal)
860881 uses : actions/upload-release-asset@v1
@@ -1088,6 +1109,27 @@ jobs:
10881109 asset_name : scala3-${{ env.RELEASE_TAG }}-x86_64-pc-win32.tar.gz.sha256
10891110 asset_content_type : text/plain
10901111
1112+
1113+ # Windows x86_64 MSI
1114+ - name : Upload .msi file to GitHub Release (Windows x86_64 MSI)
1115+ uses : actions/upload-release-asset@v1
1116+ env :
1117+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1118+ with :
1119+ upload_url : ${{ steps.create_gh_release.outputs.upload_url }}
1120+ asset_path : ./scala3-${{ env.RELEASE_TAG }}.msi
1121+ asset_name : scala3-${{ env.RELEASE_TAG }}.msi
1122+ asset_content_type : application/x-msi
1123+ - name : Upload .msi file SHA to GitHub Release (Windows x86_64 MSI)
1124+ uses : actions/upload-release-asset@v1
1125+ env :
1126+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1127+ with :
1128+ upload_url : ${{ steps.create_gh_release.outputs.upload_url }}
1129+ asset_path : ./scala3-${{ env.RELEASE_TAG }}.msi.sha256
1130+ asset_name : scala3-${{ env.RELEASE_TAG }}.msi.sha256
1131+ asset_content_type : text/plain
1132+
10911133 - name : Publish Release
10921134 run : ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleUpload"
10931135
@@ -1114,7 +1156,9 @@ jobs:
11141156
11151157 build-msi-package :
11161158 uses : ./.github/workflows/build-msi.yml
1117- if : github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')
1159+ if :
1160+ (github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')) ||
1161+ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/'))
11181162
11191163 test-msi-package :
11201164 uses : ./.github/workflows/test-msi.yml
0 commit comments