mirror of
https://github.com/owainwilliams/umbPublisher.git
synced 2026-07-22 13:00:24 +00:00
16 lines
No EOL
594 B
PowerShell
16 lines
No EOL
594 B
PowerShell
$Repo = "OwainWilliams/umbpublisher" # Replace with your actual repository name
|
|
$ManifestFile = "manifest.json"
|
|
$JSFile = "main.js"
|
|
|
|
# Get latest release info
|
|
$ReleaseUrl = "https://api.github.com/repos/$Repo/releases/latest"
|
|
$Release = Invoke-RestMethod -Uri $ReleaseUrl
|
|
|
|
# Loop through assets and download the files
|
|
foreach ($Asset in $Release.assets) {
|
|
if ($Asset.name -eq $ManifestFile -or $Asset.name -eq $JSFile) {
|
|
$DownloadUrl = $Asset.browser_download_url
|
|
Invoke-WebRequest -Uri $DownloadUrl -OutFile $Asset.name
|
|
Write-Host "Downloaded: $Asset.name"
|
|
}
|
|
} |