From 2b590589182d5837d5442367da98bb6f04ca7040 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 12:48:47 +0300 Subject: [PATCH] updated build-go.ps1 --- builders/build-go.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builders/build-go.ps1 b/builders/build-go.ps1 index e92f082..dd84a4b 100644 --- a/builders/build-go.ps1 +++ b/builders/build-go.ps1 @@ -28,6 +28,14 @@ param( Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking +function Create-ArtifactDirectories { + $env:BINARIES_DIRECTORY = Join-Path $env:RUNNER_TEMP "binaries" + New-Item -Path $env:BINARIES_DIRECTORY -ItemType "directory" + + $env:ARTIFACT_DIRECTORY = Join-Path $env:RUNNER_TEMP "artifact" + New-Item -Path $env:ARTIFACT_DIRECTORY -ItemType "directory" +} + function Get-GoBuilder { <# .SYNOPSIS @@ -66,6 +74,8 @@ function Get-GoBuilder { return $builder } +Create-ArtifactDirectories + ### Create Go builder instance, and build artifact $Builder = Get-GoBuilder -Version $Version -Platform $Platform -Architecture $Architecture $Builder.Build()