diff --git a/get-new-tool-versions/get-new-tool-versions.ps1 b/get-new-tool-versions/get-new-tool-versions.ps1 index 75e0353..de31ffd 100644 --- a/get-new-tool-versions/get-new-tool-versions.ps1 +++ b/get-new-tool-versions/get-new-tool-versions.ps1 @@ -29,7 +29,11 @@ if ($ToolName -eq "Xamarin") { if ($VersionsToBuild) { $availableVersions = $VersionsToBuild -join $joinChars Write-Host "The following versions are available to build:`n${availableVersions}" - Write-Host "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]${availableVersions}" + if ($ToolName -eq "Go") { + Write-Host "::set-output name=version_number::${availableVersions}" + } else { + Write-Host "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]${availableVersions}" + } } else { Write-Host "There aren't versions to build" } diff --git a/github/github-api.psm1 b/github/github-api.psm1 index 3103ed0..6ba32c7 100644 --- a/github/github-api.psm1 +++ b/github/github-api.psm1 @@ -124,6 +124,11 @@ class GitHubApi } } + [void] CancelWorkflow([string]$WorkflowId) { + $url = "actions/runs/$WorkflowId/cancel" + $this.InvokeRestMethod($url, 'POST', $null, $null) + } + [object] hidden InvokeRestMethod( [string] $Url, [string] $Method,