-
-
Save rewida17/754c2636154a05c8a32bb76ef6609f4d to your computer and use it in GitHub Desktop.
PowerShell - Get latest release zip from GitHub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name="creator/project" | |
$uri="$(Invoke-WebRequest -Method Get "https://api.github.com/repos/$name/releases/latest" | ConvertFrom-Json | Select-Object -ExpandProperty zipball_url)" | |
Invoke-RestMethod -Method Get -Uri $uri -OutFile last.zip | |
Expand-Archive -Path last.zip -DestinationPath $targetDir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment