diff --git a/README.md b/README.md index 467edfd..ac049a2 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ steps: | `version` | No | | Release version identifier (alias: `release_version`) | | `stage` | No | | Deployment stage such as `staging` or `production` (required for `update`) | | `include_paths` | No | | Filter commits by file paths (comma-separated globs for monorepos) | +| `log_level` | No | | Log verbosity: `quiet` or `verbose`. Omit for default output. | | `cli_version` | No | `latest` | Linear Release CLI version tag to install | `cli_version` defaults to `latest`, so the action automatically uses the newest CLI release. For reproducible builds, pin an exact tag (for example, `v0.5.0`). If stability is more important than automatic updates, prefer a pinned version. diff --git a/action.yml b/action.yml index f499dd3..74e6e8b 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,9 @@ inputs: include_paths: description: Filter commits by file paths using comma-separated globs (e.g., "apps/web/**,packages/**"). Useful for monorepos. required: false + log_level: + description: Log verbosity. Use "quiet" for errors only or "verbose" for detailed progress. Omit for default output. + required: false cli_version: description: Linear Release CLI version to install (e.g., "v0.5.0" or "latest"). required: false @@ -69,3 +72,4 @@ runs: INPUT_RELEASE_VERSION: ${{ inputs.release_version }} INPUT_STAGE: ${{ inputs.stage }} INPUT_INCLUDE_PATHS: ${{ inputs.include_paths }} + INPUT_LOG_LEVEL: ${{ inputs.log_level }} diff --git a/run.sh b/run.sh index 1b983e2..52c8899 100644 --- a/run.sh +++ b/run.sh @@ -54,6 +54,17 @@ args=() [[ -n "${INPUT_STAGE:-}" ]] && args+=("--stage=${INPUT_STAGE}") [[ -n "${INPUT_INCLUDE_PATHS:-}" ]] && args+=("--include-paths=${INPUT_INCLUDE_PATHS}") +if [[ -n "${INPUT_LOG_LEVEL:-}" ]]; then + case "$INPUT_LOG_LEVEL" in + quiet) args+=("--quiet") ;; + verbose) args+=("--verbose") ;; + *) + echo "::error::Invalid log_level '$INPUT_LOG_LEVEL'. Must be: quiet or verbose" + exit 1 + ;; + esac +fi + echo "Running: $BIN_PATH $COMMAND ${args[*]}" output=$("$BIN_PATH" "$COMMAND" --json "${args[@]}")