@@ -737,7 +737,7 @@ jobs:
737737        - ${{ github.workspace }}/../../cache/sbt:/root/.sbt 
738738        - ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache 
739739        - ${{ github.workspace }}/../../cache/general:/root/.cache 
740-     needs : [test_non_bootstrapped, test, mima, community_build_a, community_build_b, community_build_c, test_sbt, test_java8, build-sdk-package] 
740+     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 ] 
741741    if : " github.event_name == 'push'
742742         && startsWith(github.event.ref, 'refs/tags/')"  
743743
@@ -816,6 +816,18 @@ jobs:
816816          prepareSDK "-x86_64-apple-darwin"  "dist-mac-x86_64"    "./dist/mac-x86_64/" 
817817          prepareSDK "-x86_64-pc-win32"      "dist-win-x86_64"    "./dist/win-x86_64/" 
818818
819+ name : Download MSI package 
820+         uses : actions/download-artifact@v4 
821+         with :
822+           name : scala.msi 
823+           path : . 
824+       - name : Prepare MSI package 
825+         shell : bash 
826+         run : |  
827+           msiInstaller="scala3-${{ env.RELEASE_TAG }}.msi" 
828+           mv scala.msi "${msiInstaller}" 
829+           sha256sum "${msiInstaller}" > "${msiInstaller}.sha256" 
830+ 
819831#  Create the GitHub release
820832      - name : Create GitHub Release 
821833        id : create_gh_release 
@@ -829,10 +841,10 @@ jobs:
829841          draft : true 
830842          prerelease : ${{ contains(env.RELEASE_TAG, '-') }} 
831843
832-       #  The following steps are generated using template:
833-       #  def template(distribution: String, suffix: String) = 
834-       #     def upload(kind: String, path: String, contentType: String) =
835-       #       s"""- name: Upload $kind to GitHub Release ($distribution)
844+       #  The following upload  steps are generated using template:
845+       #  val baseFileName = "scala3-${{ env.RELEASE_TAG }}" 
846+       #  def upload(kind: String, path: String, contentType: String, distribution : String) =
847+       #    s"""- name: Upload $kind to GitHub Release ($distribution)
836848      #          uses: actions/upload-release-asset@v1
837849      #          env:
838850      #            GITHUB_TOKEN: $${{ secrets.GITHUB_TOKEN }}
@@ -841,24 +853,33 @@ jobs:
841853      #            asset_path: ./${path}
842854      #            asset_name: ${path}
843855      #            asset_content_type: ${contentType}"""
844-       #    val filename = s"scala3-$${{ env.RELEASE_TAG }}${suffix}"
856+       #  def uploadSDK(distribution: String, suffix: String) =
857+       #    val filename = s"${baseFileName}${suffix}"
845858      #    s"""
846859      #        # $distribution
847-       #        ${upload("zip archive", s"$filename.zip", "application/zip")}
848-       #        ${upload("zip archive SHA", s"$filename.zip.sha256", "text/plain")}
849-       #        ${upload("tar.gz archive", s"$filename.tar.gz", "application/gzip")}
850-       #        ${upload("tar.gz archive SHA", s"$filename.tar.gz.sha256", "text/plain")}
860+       #        ${upload("zip archive", s"$filename.zip", "application/zip", distribution)}
861+       #        ${upload("zip archive SHA", s"$filename.zip.sha256", "text/plain", distribution)}
862+       #        ${upload("tar.gz archive", s"$filename.tar.gz", "application/gzip", distribution)}
863+       #        ${upload("tar.gz archive SHA", s"$filename.tar.gz.sha256", "text/plain", distribution)}
864+       #  """
865+       #  def uploadMSI() = 
866+       #      val distribution = "Windows x86_64 MSI"
867+       #      s"""
868+       #        # $distribution
869+       #        ${upload(".msi file", s"${baseFileName}.msi", "application/x-msi", distribution)}
870+       #        ${upload(".msi file SHA", s"${baseFileName}.msi.sha256", "text/plain", distribution)}
851871      #  """
852- 
853872      #  @main def gen =
854873      #    Seq(
855-       #      template("Universal", ""),
856-       #      template("Linux x86-64", "-x86_64-pc-linux"),
857-       #      template("Linux aarch64", "-aarch64-pc-linux"),
858-       #      template("Mac x86-64", "-x86_64-apple-darwin"),
859-       #      template("Mac aarch64", "-aarch64-apple-darwin"),
860-       #      template("Windows x86_64", "-x86_64-pc-win32")
874+       #      uploadSDK("Universal", ""),
875+       #      uploadSDK("Linux x86-64", "-x86_64-pc-linux"),
876+       #      uploadSDK("Linux aarch64", "-aarch64-pc-linux"),
877+       #      uploadSDK("Mac x86-64", "-x86_64-apple-darwin"),
878+       #      uploadSDK("Mac aarch64", "-aarch64-apple-darwin"),
879+       #      uploadSDK("Windows x86_64", "-x86_64-pc-win32"),
880+       #      uploadMSI()
861881      #    ).foreach(println)
882+ 
862883      #  Universal
863884      - name : Upload zip archive to GitHub Release (Universal) 
864885        uses : actions/upload-release-asset@v1 
@@ -1092,6 +1113,27 @@ jobs:
10921113          asset_name : scala3-${{ env.RELEASE_TAG }}-x86_64-pc-win32.tar.gz.sha256 
10931114          asset_content_type : text/plain 
10941115
1116+ 
1117+       #  Windows x86_64 MSI
1118+       - name : Upload .msi file to GitHub Release (Windows x86_64 MSI) 
1119+         uses : actions/upload-release-asset@v1 
1120+         env :
1121+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
1122+         with :
1123+           upload_url : ${{ steps.create_gh_release.outputs.upload_url }} 
1124+           asset_path : ./scala3-${{ env.RELEASE_TAG }}.msi 
1125+           asset_name : scala3-${{ env.RELEASE_TAG }}.msi 
1126+           asset_content_type : application/x-msi 
1127+       - name : Upload .msi file SHA to GitHub Release (Windows x86_64 MSI) 
1128+         uses : actions/upload-release-asset@v1 
1129+         env :
1130+           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
1131+         with :
1132+           upload_url : ${{ steps.create_gh_release.outputs.upload_url }} 
1133+           asset_path : ./scala3-${{ env.RELEASE_TAG }}.msi.sha256 
1134+           asset_name : scala3-${{ env.RELEASE_TAG }}.msi.sha256 
1135+           asset_content_type : text/plain 
1136+ 
10951137      - name : Publish Release 
10961138        run : ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease" 
10971139
@@ -1118,7 +1160,9 @@ jobs:
11181160
11191161  build-msi-package :
11201162    uses : ./.github/workflows/build-msi.yml 
1121-     if   : github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]') 
1163+     if   :
1164+       (github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_msi]')) || 
1165+       (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) 
11221166    #  TODO: ADD A JOB THAT DEPENDS ON THIS TO TEST THE MSI
11231167
11241168  build-sdk-package :
0 commit comments