Skip to content

Instantly share code, notes, and snippets.

@matt40k
Created March 3, 2016 21:06
Show Gist options
  • Save matt40k/6eb4e29f2138744b7722 to your computer and use it in GitHub Desktop.
Save matt40k/6eb4e29f2138744b7722 to your computer and use it in GitHub Desktop.
Example of creating a release on GitHub
$url = 'https://api.github.com/repos/simsbulkimport/simsbulkimport/releases'
$apiKey = '{{REMOVED}}'
$header = @{"Authorization"="token "+ $apiKey}
$content = @{tag_name="v1.0.0";target_commitish="master";name="v1.0.0";body="Description of the release";draft=$false;prerelease=$false} | ConvertTo-Json
$r = Invoke-WebRequest -Uri $url -Method POST -Headers $header -Body $content
Write-Host $r.Content | ConvertFrom-Json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment