Skip to content

Instantly share code, notes, and snippets.

View CorneliusJack's full-sized avatar

Jérôme Demont CorneliusJack

View GitHub Profile
@CorneliusJack
CorneliusJack / PS-GetLatestReleaseZip.ps1
Created November 15, 2017 16:46
PowerShell script used to download and extract the latest release zip file of a private project from the GitHub API
## PowerShell script used to download and extract the latest release zip file of a private project from the GitHub API ##
# Parameters
$orga = "[YOUR_ORGANIZATION]"
$repo = "[YOUR_PROJECT]"
$apiUrl = "https://api.github.com/repos/$orga/$repo/releases/latest"
$token = "[YOUR_TOKEN]"
$folder = "C:\[YOUR_PATH]"
$date = Get-Date -format "yyyy-MM-dd"
$zip = "$folder\$repo-$date.zip"