anchor.diff:  let gitOwner = "MyGithubUsername"
   let gitRepoName = "MyLib.1"
   
  +let releaseBranch = "master"
  +let releaseNotes = Fake.Core.ReleaseNotes.load "RELEASE_NOTES.md"
  +
  +let publishUrl = "https://www.nuget.org"
  +
  +let paketToolPath = __SOURCE_DIRECTORY__ </> ".paket" </> (if Environment.isWindows then "paket.exe" else "paket")
  +
  +//-----------------------------------------------------------------------------
  +// Helpers
  +//-----------------------------------------------------------------------------
   let isRelease (targets : Target list) =
       targets
       |> Seq.map(fun t -> t.Name)
       |> Seq.exists ((=)"Release")
  +
  +let invokeAsync f = async { f () }
   
   let configuration (targets : Target list) =
       let defaultVal = if isRelease targets then "Release" else "Debug"
  
positive.code:     let sourcelink optionConfig args =
          tool optionConfig "sourcelink" args
  
  
  
  Target.create "Clean" <| fun _ ->
      ["bin"; "temp" ; distDir; coverageReportDir]
      |> Shell.cleanDirs
  
  
negative.code:    let files = !! distGlob
  
     GitHub.createClientWithToken token
     |> GitHub.draftNewRelease gitOwner gitRepoName releaseNotes.NugetVersion (releaseNotes.SemVer.PreRelease <> None) releaseNotes.Notes
     |> GitHub.uploadFiles files
     |> GitHub.publishDraft
     |> Async.RunSynchronously
  
  let formatCode _ =
      srcAndTest
      |> Seq.map (IO.Path.GetDirectoryName)
      |> Seq.iter (fun projDir ->
          dotnet.fantomas id (sprintf "--recurse %s" projDir)
      )
  
  //-----------------------------------------------------------------------------
  // Target Declaration
  //-----------------------------------------------------------------------------
  
  Target.create "Clean" clean
  Target.create "DotnetRestore" dotnetRestore
  Target.create "DotnetBuild" dotnetBuild
  Target.create "DotnetTest" dotnetTest
  Target.create "GenerateCoverageReport" generateCoverageReport
  Target.create "WatchTests" watchTests
  Target.create "AssemblyInfo" generateAssemblyInfo
  Target.create "DotnetPack" dotnetPack
  Target.create "SourcelinkTest" sourceLinkTest
  Target.create "Publish" publishToNuget
  Target.create "GitRelease" gitRelease
  Target.create "GitHubRelease" githubRelease
  Target.create "FormatCode" formatCode
  Target.create "Release" ignore
  
  
  //-----------------------------------------------------------------------------
  // Target Dependencies
  //-----------------------------------------------------------------------------
  
  // Only call Clean if DotnetPack was in the call chain
  // Ensure Clean is called before DotnetRestore
  "Clean" ?=> "DotnetRestore"
  "Clean" ==> "DotnetPack"
  
  // Only call AssemblyInfo if Publish was in the call chain
  // Ensure AssemblyInfo is called after DotnetRestore and before DotnetBuild
  "DotnetRestore" ?=> "AssemblyInfo"
  "AssemblyInfo" ?=> "DotnetBuild"
  "AssemblyInfo" ==> "Publish"
  