@hackage github-workflow-commands0.0.1.0

GitHub Actions workflow commands

github-workflow-commands

For printing workflow commands in GitHub Actions.

See Workflow commands for GitHub Actions.

The code herein is based on GitHub Actions Toolkit.


import qualified GitHub.Workflow.Command as GH
import Control.Lens ((&), (?~))

An annotation is at minimum just a string.

example1 :: IO ()
example1 =
  GH.executeCommand $
    GH.error "Something failed."

An annotation can also include a location.

someLocation :: GH.Location
someLocation =
  GH.inFile "app.js"
    & GH.position ?~
        ( GH.atLine 13
            & GH.extent ?~ GH.ToLine 16
        )
example2 :: IO ()
example2 =
  GH.executeCommand $
    GH.warning "Something seems amiss here."
      & GH.location ?~ someLocation

CHANGELOG | LICENSE