Skip to content

Commit

Permalink
Adds API key param
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak committed Dec 11, 2017
1 parent 89ae923 commit 2995cc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/New-GitHubRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Param(
[Parameter()]
[String]$AccountName,
[Parameter()]
[String]$APIKey,
[Parameter()]
[String]$RepositoryName,
[Parameter()]
[String]$Name,
Expand All @@ -22,13 +24,13 @@ Param(
)

if (!(Get-Module -Name GitHubReleaseManager -ListAvailable)){
Install-Module -Name GitHubReleaseManager -Scope CurrentUser -Confirm:$false -Force
Install-Module -Name GitHubReleaseManager -Scope CurrentUser -Confirm:$false -Force
}
Import-Module -Name GitHubReleaseManager

try {

$null = Set-GitHubSessionInformation -UserName $AccountName -APIKey $ENV:GitHubApiKey
$null = Set-GitHubSessionInformation -UserName $AccountName -APIKey $ApiKey

try {
$GitHubRelease = Get-GitHubRelease -Repository $RepositoryName -Tag $Tag
Expand Down

0 comments on commit 2995cc4

Please sign in to comment.