diff --git a/README.md b/README.md index d1b3d2e..c8cfa7a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ This action generates a changelog based on your Git history using [git-cliff](ht ### Environment variables - `OUTPUT`: Output file. (Default: `"git-cliff/CHANGELOG.md"`) +- `DEBUG`: Set to a not empty value (e.g. `"true"`) to print executed commmands. (Default: `unset`) > [!IMPORTANT] > Check out the entire history via `fetch-depth: 0` before running this action. diff --git a/run.sh b/run.sh index 7f1b517..fd053f6 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,10 @@ #!/bin/bash -set -uxo pipefail +if [[ -n "$DEBUG" ]]; then + set -x +fi + +set -uo pipefail # Avoid file expansion when passing parameters like with '*' set -o noglob