-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.ps1
More file actions
41 lines (32 loc) · 974 Bytes
/
action.ps1
File metadata and controls
41 lines (32 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env pwsh
[CmdletBinding()]
param (
[Parameter()]
[string]$Path,
[Parameter()]
[string]$StagingPath,
[Parameter()]
[object]$Repository,
[Parameter()]
[object]$Release,
[Parameter()]
[string]$ReleaseUploadUrl,
[Parameter()]
[string]$Token
)
Import-Module $PSScriptRoot/src/BsdataCatpkg
$buildArgs = @{
Path = $Path
StagingPath = $StagingPath
Repository = $Repository.full_name
RepositoryDisplayName = $Repository.description ? $Repository.description : $Repository.name
RepositoryUrl = $Repository.html_url
Release = $Release
}
$publishArgs = @{
UploadUrl = if ($ReleaseUploadUrl) { $ReleaseUploadUrl } else { $Release.upload_url }
AssetsUrl = $Release.assets_url
Token = $Token
}
Build-BsdataReleaseAssets @buildArgs | Publish-GitHubReleaseAsset @publishArgs -Force
Write-Host "Done" -ForegroundColor Green