Skip to content

Commit

Permalink
Fixed publishing of github release
Browse files Browse the repository at this point in the history
  • Loading branch information
lipkau committed Oct 1, 2018
1 parent 589380f commit 858355b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions AtlassianPS.Configuration.build.ps1
Expand Up @@ -293,6 +293,8 @@ task PublishToGallery {

# Synopsis: push a tag with the version to the git repository
task TagReplository GetNextVersion, {
Assert-True (-not [String]::IsNullOrEmpty($GithubAccessToken)) "No key for the PSGallery"

$releaseText = "Release version $env:NextBuildVersion"

# Push a tag to the repository
Expand Down
7 changes: 4 additions & 3 deletions Tools/BuildTools.psm1
Expand Up @@ -142,8 +142,9 @@ function Test-ShouldDeploy {
function Publish-GithubRelease {
param(
[Parameter( Mandatory )]
[ValidateNotNullOrEmpty]
$GITHUB_ACCESS_TOKEN,
[ValidateNotNullOrEmpty()]
[String]$GITHUB_ACCESS_TOKEN,
[String]$ProjectOwner = "AtlassianPS",
[String]$ReleaseText,
[Object]$NextBuildVersion
)
Expand All @@ -160,7 +161,7 @@ function Publish-GithubRelease {
} | ConvertTo-Json

$releaseParams = @{
Uri = "https://api.github.com/repos/{0}/releases" -f $env:BHProjectName
Uri = "https://api.github.com/repos/{0}/{1}/releases" -f $ProjectOwner, $env:BHProjectName
Method = 'POST'
Headers = @{
Authorization = 'Basic ' + [Convert]::ToBase64String(
Expand Down

0 comments on commit 858355b

Please sign in to comment.