@@ -92,10 +92,11 @@ let docsSiteBaseUrl = sprintf "https://%s.github.io/%s" gitOwner gitRepoName
9292
9393let disableCodeCoverage = environVarAsBoolOrDefault " DISABLE_COVERAGE" false
9494
95- let githubToken = Environment.environVarOrNone " GITHUB_TOKEN"
95+ let githubToken = lazy ( Environment.environVarOrNone " GITHUB_TOKEN" )
9696
97-
98- let nugetToken = Environment.environVarOrNone " NUGET_TOKEN"
97+ let nugetToken =
98+ lazy
99+ ( Environment.environVarOrNone " NUGET_TOKEN" )
99100
100101//-----------------------------------------------------------------------------
101102// Helpers
@@ -557,7 +558,7 @@ let publishToNuget _ =
557558 ToolType = ToolType.CreateLocalTool()
558559 PublishUrl = publishUrl
559560 WorkingDir = " dist"
560- ApiKey = match nugetToken with
561+ ApiKey = match nugetToken.Value with
561562 | Some s -> s
562563 | _ -> c.ApiKey // assume paket-config was set properly
563564 }
@@ -587,7 +588,7 @@ let gitRelease _ =
587588let githubRelease _ =
588589 allReleaseChecks ()
589590 let token =
590- match githubToken with
591+ match githubToken.Value with
591592 | Some s -> s
592593 | _ -> failwith " please set the github_token environment variable to a github personal access token with repo access."
593594
@@ -665,8 +666,8 @@ let initTargets () =
665666 //-----------------------------------------------------------------------------
666667 // Hide Secrets in Logger
667668 //-----------------------------------------------------------------------------
668- Option.iter( TraceSecrets.register " <GITHUB_TOKEN>" ) githubToken
669- Option.iter( TraceSecrets.register " <NUGET_TOKEN>" ) nugetToken
669+ Option.iter( TraceSecrets.register " <GITHUB_TOKEN>" ) githubToken.Value
670+ Option.iter( TraceSecrets.register " <NUGET_TOKEN>" ) nugetToken.Value
670671 //-----------------------------------------------------------------------------
671672 // Target Declaration
672673 //-----------------------------------------------------------------------------
0 commit comments