From 5a2b344394633b0d31fdbf120f36c4c14b7d336d Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Wed, 21 Feb 2024 08:50:31 -0500 Subject: [PATCH] Update README and examples --- .github/workflows/example.yml | 2 +- README.md | 38 ++++++++++++++++------------------- action.yml | 5 +++++ 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 5689fb6..c6e6e35 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -104,4 +104,4 @@ jobs: - uses: ./ with: working-directory: example - stack-yaml: ${{ matrix.stack-yaml }} + stack-arguments: --stack-yaml ${{ matrix.stack-yaml }} diff --git a/README.md b/README.md index f8617be..0e8053a 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,6 @@ jobs: - uses: freckle/stack-action@v6 ``` -## Notable Changes in v6 - -The `stack-yaml` input has been removed. Users can either set `env.STACK_YAML` -or supply `--stack-yaml` via `inputs.stack-arguments` instead. - ## Notable Changes in v5 As of version 5, the single `stack-arguments` input has been broken up into @@ -71,21 +66,22 @@ jobs: ## Inputs -| name | description | required | default | -| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- | -| `working-directory` |

Working directory for run commands

| `false` | `""` | -| `test` |

Whether to run tests

| `false` | `true` | -| `stack-arguments` |

Additional arguments for all top-level stack command invocations.

| `false` | `--no-terminal` | -| `stack-query-arguments` |

Additional arguments in stack query invocations.

| `false` | `""` | -| `stack-path-arguments` |

Additional arguments in stack path invocations.

| `false` | `""` | -| `stack-setup-arguments` |

Additional arguments in stack setup invocations.

| `false` | `""` | -| `stack-build-arguments` |

Additional arguments for all stack build invocations.

| `false` | `--fast --pedantic` | -| `stack-build-arguments-dependencies` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Dependencies step.

| `false` | `""` | -| `stack-build-arguments-build` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Build step.

| `false` | `""` | -| `stack-build-arguments-test` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Test step.

| `false` | `""` | -| `cache-prefix` |

Prefix applied to all cache keys. This can be any value you like, but teams often use v{N} and bump it to v{N+1} when/if they need to explicitly bust caches.

| `false` | `""` | -| `cache-save-always` |

Save artifacts to the cache even if the build fails. This may speed up builds in subsequent runs at the expense of slightly-longer builds when a full cache-hit occurs. Since @v4.2.0

| `false` | `false` | -| `upgrade-stack` |

Upgrade stack

| `false` | `true` | +| name | description | required | default | +| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- | +| `working-directory` |

Working directory for run commands

| `false` | `""` | +| `test` |

Whether to run tests

| `false` | `true` | +| `stack-arguments` |

Additional arguments for all top-level stack command invocations.

| `false` | `--no-terminal` | +| `stack-query-arguments` |

Additional arguments in stack query invocations.

| `false` | `""` | +| `stack-path-arguments` |

Additional arguments in stack path invocations.

| `false` | `""` | +| `stack-setup-arguments` |

Additional arguments in stack setup invocations.

| `false` | `""` | +| `stack-build-arguments` |

Additional arguments for all stack build invocations.

| `false` | `--fast --pedantic` | +| `stack-build-arguments-dependencies` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Dependencies step.

| `false` | `""` | +| `stack-build-arguments-build` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Build step.

| `false` | `""` | +| `stack-build-arguments-test` |

Additional arguments passed after stack-build-arguments in stack build invocations on the Test step.

| `false` | `""` | +| `cache-prefix` |

Prefix applied to all cache keys. This can be any value you like, but teams often use v{N} and bump it to v{N+1} when/if they need to explicitly bust caches.

| `false` | `""` | +| `cache-save-always` |

Save artifacts to the cache even if the build fails. This may speed up builds in subsequent runs at the expense of slightly-longer builds when a full cache-hit occurs. Since @v4.2.0

| `false` | `false` | +| `upgrade-stack` |

Upgrade stack

| `false` | `true` | +| `stack-yaml` |

This option is deprecated and will be removed in a future version, set env.STACK_YAML or use stack-arguments instead. For now, if present, --stack-yaml ... will be prepended to stack-arguments.

| `false` | `""` | @@ -146,7 +142,7 @@ jobs: - uses: actions/checkout@v4 - uses: freckle/stack-action@v5 with: - stack-yaml: ${{ matrix.stack-yaml }} + stack-arguments: --stack-yaml ${{ matrix.stack-yaml }} ``` See [generate-matrix/action.yml](./generate-matrix/action.yml) for more details. diff --git a/action.yml b/action.yml index 413de7d..39bfa3f 100644 --- a/action.yml +++ b/action.yml @@ -52,6 +52,11 @@ inputs: description: | Upgrade stack default: true + stack-yaml: + description: | + **This option is deprecated** and will be removed in a future version, set + `env.STACK_YAML` or use `stack-arguments` instead. For now, if present, + `--stack-yaml ...` will be prepended to `stack-arguments`. runs: using: "node20" main: "dist/index.js"