anchor.diff:      |> GitHub.publishDraft
       |> Async.RunSynchronously
   
  -Target.create "BeginRelease" Target.DoNothing
  +Target.create "BeginRelease" ignore
   
  -Target.create "PublishRelease" Target.DoNothing
  +Target.create "PublishRelease" ignore
   
   open Fake.Core.TargetOperators
   
  
positive.code: let latestReleaseNotes = List.head releaseNotes
  let previousReleaseNotes = List.item 1 releaseNotes
  
  Target.Description "Tags the current commit with the version and pushes the tag"
  Target.create "GitTagAndPush" <| fun _ ->
      if not <| Git.Information.isCleanWorkingCopy "." then
          failwith "Please ensure the working copy is clean before performing a release"
  
negative.code:             Version = latestReleaseNotes.NugetVersion
              OutputPath = "./bin" }
  
  Target.description "Ensures you have specified your NuGet API key in the NUGET_KEY env var"
  Target.create "ValidateNugetApiKey" <| fun _ ->
      if String.IsNullOrWhiteSpace nugetApiKey then
          failwith "Please set the NUGET_KEY environment variable to your NuGet API Key"
  
  Target.description "Pushes the NuGet package to the package repository"
  Target.create "PaketPush" <| fun _ ->
      Paket.push <| fun p ->
          { p with
              WorkingDir = "./bin"
              ApiKey = nugetApiKey }
  
  Target.description "Ensures you have specified your GitHub personal access token in the GITHUB_TOKEN env var"
  Target.create "ValidateGitHubCredentials" <| fun _ ->
          if String.IsNullOrWhiteSpace gitHubToken then
              failwith "Please set the GITHUB_TOKEN environment variable to a GitHub personal access token with repo access."
  
  Target.description "Creates a release on GitHub with the release notes"
  Target.create "GitHubRelease" <| fun _ ->
      let gitHubReleaseNotes =
          [ yield "## Changelog"
  