Skip to content

Commit f45823b

Browse files
committed
Upload assets to release
1 parent a656311 commit f45823b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/development.md

-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,5 @@ use the same code which includes dependencies).
140140
* `Update-Changelog` could be faster by not downloading _every_ PR
141141
* `Update-Changelog` should use exactly two emoji and in the right order
142142
* `Update-Version` could be run by `Update-Changelog`
143-
* `New-DraftRelease` could automatically set the tag pointers and upload the binaries
144143
* The build should emit an appropriately named VSIX instead of us manually renaming it
145144
* A `Publish-Binaries` function could be written to push the binaries out

tools/ReleaseTools.psm1

+8-3
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ function New-DraftRelease {
342342
param(
343343
[Parameter(Mandatory)]
344344
[ValidateSet([RepoNames])]
345-
[string]$RepositoryName
345+
[string]$RepositoryName,
346+
347+
[Parameter(ValueFromPipeline)]
348+
[string[]]$Assets
346349
)
347350
$Version = Get-Version -RepositoryName $RepositoryName
348351
$Changelog = (Get-FirstChangelog -RepositoryName $RepositoryName) -join "`n"
@@ -354,8 +357,10 @@ function New-DraftRelease {
354357
Name = "v$Version"
355358
Body = $ChangeLog
356359
PreRelease = [bool]$Version.PreReleaseLabel
360+
OwnerName = "PowerShell"
361+
RepositoryName = $RepositoryName
357362
}
358363

359-
Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName |
360-
New-GitHubRelease @ReleaseParams
364+
$Release = New-GitHubRelease @ReleaseParams
365+
$Assets | New-GitHubReleaseAsset -Release $Release.Id
361366
}

0 commit comments

Comments
 (0)