File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ s3Upload := {
44
44
ghUpload := {
45
45
import sttp .client3 ._
46
46
import _root_ .io .circe ._ , _root_ .io .circe .parser ._
47
+ import scala .concurrent .duration ._
47
48
48
49
val log = streams.value.log
49
50
val ghRelease = s " v ${(Universal / version).value}"
@@ -65,15 +66,16 @@ ghUpload := {
65
66
log.info(s " Uploading ${file.getAbsolutePath} as ${file.getName} to https://github.com/scala/scala/releases/tag/ $ghRelease" )
66
67
67
68
// https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset
68
- val request = basicRequest
69
+ val response = basicRequest
69
70
.post(uri " https://uploads.github.com/repos/scala/scala/releases/ ${releaseId}/assets?name= ${file.getName}" )
70
71
.contentType(" application/octet-stream" )
71
72
.header(" Accept" , " application/vnd.github+json" )
72
73
.header(" Authorization" , s " Bearer $token" )
73
74
.header(" X-GitHub-Api-Version" , " 2022-11-28" )
74
75
.body(file)
76
+ .readTimeout(15 .minutes) // .deb is 650+ MB (API docs are not zipped... scala/scala-dist#189)
77
+ .send(backend)
75
78
76
- val response = request.send(backend)
77
79
if (response.code.code != 201 )
78
80
throw new MessageOnlyException (s " Upload failed: status= ${response.code}\n ${response.body}" )
79
81
}
You can’t perform that action at this time.
0 commit comments