Skip to content

Commit 2f168d6

Browse files
committed
WIP: Upload assets to release
1 parent a4200b4 commit 2f168d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/ReleaseTools.psm1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ function New-DraftRelease {
345345
[ValidateSet([RepoNames])]
346346
[string]$RepositoryName
347347
)
348+
param(
349+
[Parameter(ValueFromPipeline)]
350+
[string[]]$Assets
351+
)
348352
$Version = Get-Version -RepositoryName $RepositoryName
349353
$Changelog = (Get-FirstChangelog -RepositoryName $RepositoryName) -join "`n"
350354
$ReleaseParams = @{
@@ -368,6 +372,8 @@ function New-DraftRelease {
368372
Pop-Location
369373
}
370374

371-
Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName |
372-
New-GitHubRelease @ReleaseParams
375+
$Repo = Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName
376+
$Release = $Repo | New-GitHubRelease @ReleaseParams
377+
378+
$Assets | ForEach-Object { $Release | New-GitHubReleaseAsset -Path $_ }
373379
}

0 commit comments

Comments
 (0)