Skip to content

Commit

Permalink
chore: Group FAKE target output in GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed Nov 12, 2023
1 parent 76ed9ae commit 9c44c3d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ module Paths =
</> "publish"
</> "FSharp.SystemTextJson.TrimTest.dll"

module Target =

let create name action =
Target.create name
<| fun o ->
if Environment.environVarOrNone "GITHUB_ACTION" |> Option.isSome then
try
printfn $"::group::{name}"
action o
finally
printfn "::endgroup::"
else
action o

Target.create "Clean" (fun _ -> !! "**/bin" ++ "**/obj" |> Shell.cleanDirs)

Target.create "Build" (fun _ -> DotNet.build id Paths.sln)
Expand Down

0 comments on commit 9c44c3d

Please sign in to comment.