@@ -120,10 +120,12 @@ function ReadGitRemoteUrl([string] $from, [string] $remoteName) {
120
120
121
121
if ($remoteUrl.StartsWith (" ssh://" )) {
122
122
$remoteUrl = $remoteUrl.Replace (" ssh://" , " " )
123
+ $remoteUrl = $remoteUrl.Replace (" :" , " /" )
123
124
}
124
125
125
126
if ($remoteUrl.StartsWith (" git@" )) {
126
127
$remoteUrl = $remoteUrl.Replace (" git@" , " " )
128
+ $remoteUrl = $remoteUrl.Replace (" :" , " /" )
127
129
}
128
130
129
131
if ($remoteUrl.EndsWith (" .git" )) {
@@ -241,7 +243,7 @@ function PublishGitRelease([string] $from, [string] $tag, [string] $name, [strin
241
243
# Step 1
242
244
$url = " https://$gitBaseUrl /repos/$owner /$repoName /releases/tags/$tag "
243
245
$response = try {
244
- Invoke-WebRequest - Uri $url - Method Get - Headers @ {
246
+ Invoke-WebRequest - UseBasicParsing - Uri $url - Method Get - Headers @ {
245
247
" Authorization" = " token $env: GITHUB_TOKEN "
246
248
} - ErrorAction SilentlyContinue
247
249
}
@@ -281,7 +283,7 @@ function PublishGitRelease([string] $from, [string] $tag, [string] $name, [strin
281
283
Write-Host " Payload: $jsonEncodedPayload " - ForegroundColor Yellow
282
284
283
285
$response = try {
284
- Invoke-WebRequest - Uri $url - Method POST - Body $jsonEncodedPayload - Headers @ {
286
+ Invoke-WebRequest - UseBasicParsing - Uri $url - Method POST - Body $jsonEncodedPayload - Headers @ {
285
287
" Authorization" = " token $env: GITHUB_TOKEN "
286
288
" Accept" = " application/vnd.github.v3+json"
287
289
" Content-Type" = " application/json"
@@ -320,7 +322,7 @@ function PublishGitRelease([string] $from, [string] $tag, [string] $name, [strin
320
322
321
323
$bytes = [System.IO.File ]::ReadAllBytes($file )
322
324
323
- Invoke-RestMethod - Method PUT - Uri $url - Headers @ {
325
+ Invoke-RestMethod - UseBasicParsing - Method PUT - Uri $url - Headers @ {
324
326
" Authorization" = " token $env: GITHUB_TOKEN "
325
327
" Accept" = " application/vnd.github.v3+json"
326
328
" Content-Type" = " application/octet-stream"
@@ -335,7 +337,7 @@ function PublishGitRelease([string] $from, [string] $tag, [string] $name, [strin
335
337
336
338
$jsonEncodedPayload = ConvertTo-Json - InputObject $payload
337
339
$response = try {
338
- Invoke-WebRequest - Uri $url - Method PATCH - Body $jsonEncodedPayload - Headers @ {
340
+ Invoke-WebRequest - UseBasicParsing - Uri $url - Method PATCH - Body $jsonEncodedPayload - Headers @ {
339
341
" Authorization" = " token $env: GITHUB_TOKEN "
340
342
" Accept" = " application/vnd.github.v3+json"
341
343
" Content-Type" = " application/json"
0 commit comments