Skip to content

Commit 6ebaf76

Browse files
committed
WIP: Upload assets to release
1 parent fe69ac0 commit 6ebaf76

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/development.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@ Publish-Script -Path ./Install-VSCode.ps1 -NuGetApiKey (Get-Secret "PowerShell G
9292
* `Update-Changelog` could be faster by not downloading _every_ PR
9393
* `Update-Changelog` should use exactly two emoji and in the right order
9494
* `Update-Version` could be run by `Update-Changelog`
95-
* `New-DraftRelease` could automatically set the tag pointers and upload the binaries
9695
* The build should emit an appropriately named VSIX instead of us manually renaming it
9796
* A `Publish-Binaries` function could be written to push the binaries out

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)