Skip to content

Commit

Permalink
Update documentation and add deprecation messages to legacy fields of…
Browse files Browse the repository at this point in the history
… the workflow (#48)
  • Loading branch information
mmhat authored Aug 14, 2024
1 parent 1382333 commit 588092b
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 17 deletions.
67 changes: 54 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,80 @@
# get-tested

A CLI tool that retrieves the `tested-with` stanza of a cabal file and formats it in such a way that GitHub Actions can use it.
A CLI tool that retrieves the `tested-with` stanza of a cabal file and formats
it in such a way that GitHub Actions can use it.

## Usage

The inputs of the action (under the `with:` stanza) are the following:

* cabal-file:
The path to your cabal file, e.g. somefolder/myproject.cabal. required;
* version: Version of the tool. required;
* windows: (legacy) Enable Windows runner, latest version. required: false, default: false;
* windows-version: Enable Windows runner. If both `windows` and `windows-version` inputs are set, the explicit version will take priority. required: false, default: "";
* macos: (legacy) Enable macOS runner, latest version. required: false, default: false;
* macos-version: Enable macOS runner. If both `macos` and `macos-version` inputs are set, the explicit version will take priority. required: false, default: "";
* ubuntu: (legacy) Enable Ubuntu runner, latest version. required: false, default: false;
* ubuntu-version: Enable Ubuntu runner. If both `ubuntu` and `ubuntu-version` inputs are set, the explicit version will take priority. required: false, default: "".
* `cabal-file:` \
The path to your cabal file, e.g. somefolder/myproject.cabal.
\
_Required:_ true

* `version:` \
The version of the get-tested tool that is used.
\
_Required:_ false \
_Default:_ The latest release

* `windows:` \
**(deprecated)** Enable Windows runner, latest version.
\
_Required:_ false \
_Default:_ false

* `windows-version:` \
Enable Windows runner. If both `windows` and `windows-version` inputs are
set, the explicit version will take priority.
\
_Required:_ false \
_Default:_ Not set

* `macos:` \
**(deprecated)** Enable macOS runner, latest version.
\
_Required:_ false \
_Default:_ false

* `macos-version:` \
Enable macOS runner. If both `macos` and `macos-version` inputs are set, the
explicit version will take priority.
\
_Required:_ false \
_Default:_ Not set

* `ubuntu:` \
**(deprecated)** Enable Ubuntu runner, latest version.
\
_Required:_ false \
_Default:_ false

* `ubuntu-version:` \
Enable Ubuntu runner. If both `ubuntu` and `ubuntu-version` inputs are set,
the explicit version will take priority.
\
_Required:_ false \
_Default:_ Not set

See below for an example:

```yaml
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/get-tested@v0.1.7.0
uses: kleidukos/get-tested@v0.1.7.1
with:
cabal-file: get-tested.cabal
ubuntu-version: "latest"
macos-version: "13"
version: 0.1.7.0
version: 0.1.7.1
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
Expand Down
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@ inputs:
description: "The path to your cabal file, e.g. somefolder/myproject.cabal"
required: true
version:
description: "Version of the tool"
description: "Version of the get-tested tool"
required: false
default: ""
windows:
description: "(legacy) Enable Windows runner, latest version"
description: "Enable Windows runner, latest version"
required: false
default: false
deprecationMessage: "Please use 'windows-version: latest' instead."
windows-version:
description: "Enable Windows runner. If both `windows` and `windows-version` inputs are set, the explicit version will take priority"
required: false
default: ""
macos:
description: "(legacy) Enable macOS runner, latest version"
description: "Enable macOS runner, latest version"
required: false
default: false
deprecationMessage: "Please use 'macos-version: latest' instead."
macos-version:
description: "Enable macOS runner. If both `macos` and `macos-version` inputs are set, the explicit version will take priority"
required: false
default: ""
ubuntu:
description: "(legacy) Enable Ubuntu runner, latest version"
description: "Enable Ubuntu runner, latest version"
required: false
default: false
deprecationMessage: "Please use 'ubuntu-version: latest' instead."
ubuntu-version:
description: "Enable Ubuntu runner. If both `ubuntu` and `ubuntu-version` inputs are set, the explicit version will take priority"
required: false
Expand Down

0 comments on commit 588092b

Please sign in to comment.