@@ -737,7 +737,7 @@ jobs:
737
737
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
738
738
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
739
739
- ${{ 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 ]
741
741
if : " github.event_name == 'push'
742
742
&& startsWith(github.event.ref, 'refs/tags/')"
743
743
@@ -816,6 +816,18 @@ jobs:
816
816
prepareSDK "-x86_64-apple-darwin" "dist-mac-x86_64" "./dist/mac-x86_64/"
817
817
prepareSDK "-x86_64-pc-win32" "dist-win-x86_64" "./dist/win-x86_64/"
818
818
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
+
819
831
# Create the GitHub release
820
832
- name : Create GitHub Release
821
833
id : create_gh_release
@@ -829,10 +841,10 @@ jobs:
829
841
draft : true
830
842
prerelease : ${{ contains(env.RELEASE_TAG, '-') }}
831
843
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)
836
848
# uses: actions/upload-release-asset@v1
837
849
# env:
838
850
# GITHUB_TOKEN: $${{ secrets.GITHUB_TOKEN }}
@@ -841,24 +853,33 @@ jobs:
841
853
# asset_path: ./${path}
842
854
# asset_name: ${path}
843
855
# 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}"
845
858
# s"""
846
859
# # $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)}
851
871
# """
852
-
853
872
# @main def gen =
854
873
# 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()
861
881
# ).foreach(println)
882
+
862
883
# Universal
863
884
- name : Upload zip archive to GitHub Release (Universal)
864
885
uses : actions/upload-release-asset@v1
@@ -1092,8 +1113,29 @@ jobs:
1092
1113
asset_name : scala3-${{ env.RELEASE_TAG }}-x86_64-pc-win32.tar.gz.sha256
1093
1114
asset_content_type : text/plain
1094
1115
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
+
1095
1137
- name : Publish Release
1096
- run : ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease "
1138
+ run : ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleUpload "
1097
1139
1098
1140
1099
1141
open_issue_on_failure :
@@ -1118,14 +1160,16 @@ jobs:
1118
1160
1119
1161
build-msi-package :
1120
1162
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/'))
1122
1166
1123
1167
test-msi-package :
1124
1168
uses : ./.github/workflows/test-msi.yml
1125
1169
needs : [build-msi-package]
1126
1170
with :
1127
1171
# Ensure that version starts with prefix 3.
1128
- # In the future it can be adapted to compare with with git tag or version set in the build.s
1172
+ # In the future it can be adapted to compare with with git tag or version set in the project/Build.scala
1129
1173
version : " 3."
1130
1174
java-version : 8
1131
1175
0 commit comments