From 3b7702b41516aa428dfe6e295dc73476ae58f69e Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Fri, 25 Oct 2024 14:37:11 +0900 Subject: [PATCH] Add CHANGELOG for release v11 Also add a little more documentation for https://github.com/haskell-actions/run-fourmolu/pull/29 --- CHANGELOG.md | 6 ++++++ README.md | 3 +++ action.yml | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0afe5..34934c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## run-fourmolu v11 + +* Add a new `working-directory` argument that allows you to change the + working directory that `fourmolu` is run from. + [#29](https://github.com/haskell-actions/run-fourmolu/pull/29) + ## run-fourmolu v10 * Upgrade `run-formolu` to work with Node 20 instead of Node 16. diff --git a/README.md b/README.md index d60863f..7283dc0 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ Here's a more complicated example that shows more options being used: # Extra args to pass to fourmolu on the command line. extra-args: "--indent-wheres true" + + # Change to the ./my-haskell-code/ directory before running this action. + working-directory: "./my-haskell-code" ``` See [docs](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) on pattern syntax. diff --git a/action.yml b/action.yml index c565cad..17a1abd 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,11 @@ inputs: default: latest working-directory: description: > - Directory to run Fourmolu. + Directory in which to run Fourmolu. This also affects how the `pattern` + argument is interpretted, with Glob patterns being relative to this + `working-directory` argument. + + Defaults to the repository root if not set. required: false runs: using: 'node20'