You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-7Lines changed: 45 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,25 +15,53 @@ Setup the `kosli` CLI (installs the latest release by default):
15
15
16
16
```yaml
17
17
steps:
18
-
- uses: kosli-dev/setup-cli-action@v3
18
+
- uses: kosli-dev/setup-cli-action@v5
19
19
```
20
20
21
21
A specific version of the `kosli` CLI can be installed:
22
22
23
23
```yaml
24
24
steps:
25
25
- name: setup-kosli-cli
26
-
uses: kosli-dev/setup-cli-action@v3
26
+
uses: kosli-dev/setup-cli-action@v5
27
27
with:
28
28
version: 2.11.43
29
29
```
30
30
31
+
### Pin to a major or minor version
32
+
33
+
To track a major version and pick up every update within it without ever jumping to
34
+
the next (breaking) major, pass just the major number. `version: "2"` always installs
35
+
the newest stable `2.x` release, and never `3.0.0`:
36
+
37
+
```yaml
38
+
steps:
39
+
- name: setup-kosli-cli
40
+
uses: kosli-dev/setup-cli-action@v5
41
+
with:
42
+
version: "2" # newest stable 2.x, never 3.x
43
+
```
44
+
45
+
You can pin a minor line the same way. `version: "2.11"` installs the newest stable
46
+
`2.11.z` patch:
47
+
48
+
```yaml
49
+
steps:
50
+
- name: setup-kosli-cli
51
+
uses: kosli-dev/setup-cli-action@v5
52
+
with:
53
+
version: "2.11"
54
+
```
55
+
56
+
> **Quote the version.** In YAML, `version: 2.10` is parsed as the number `2.1`, which
57
+
> is not what you mean. Always quote a major or minor pin: `version: "2"`, `version: "2.10"`.
58
+
31
59
To explicitly pin to the newest published release at runtime, pass `latest`:
32
60
33
61
```yaml
34
62
steps:
35
63
- name: setup-kosli-cli
36
-
uses: kosli-dev/setup-cli-action@v3
64
+
uses: kosli-dev/setup-cli-action@v5
37
65
with:
38
66
version: latest
39
67
```
@@ -42,12 +70,22 @@ steps:
42
70
43
71
The action supports the following inputs:
44
72
45
-
- `version`: The version of `kosli` to install. Accepts a semver (e.g. `2.11.43`) or the alias `latest`, which resolves to the newest GitHub release of `kosli-dev/cli` at runtime. Defaults to `latest`.
46
-
- `github-token`: Token used to authenticate the GitHub API call that resolves `latest`. Defaults to `${{ github.token }}`; normally you do not need to set this.
73
+
- `version`: The version of `kosli` to install. Accepts:
74
+
- a full semver, e.g. `2.11.43`, installed as-is;
75
+
- a major pin, e.g. `"2"`, which resolves to the newest stable `2.x` release;
76
+
- a major.minor pin, e.g. `"2.11"`, which resolves to the newest stable `2.11.z` release;
77
+
- the alias `latest`, which resolves to the newest stable release of `kosli-dev/cli`.
78
+
79
+
Major and minor pins resolve at runtime and never select a pre-release or a higher major.
80
+
Quote partial versions (see the note above). Defaults to `latest`.
81
+
- `github-token`: Token used to authenticate the GitHub API calls that resolve `latest` or a
82
+
major/minor pin. Defaults to `${{ github.token }}`; normally you do not need to set this.
47
83
48
84
## Outputs
49
85
50
-
- `version`: The resolved `kosli` CLI version that was installed. When `version: latest` is used, this will contain the concrete semver (e.g. `2.12.0`) and can be referenced by later steps via `steps.<id>.outputs.version`.
86
+
- `version`: The resolved `kosli` CLI version that was installed. When `version` is `latest` or a
87
+
major/minor pin, this contains the concrete semver that was selected (e.g. `2.12.0`) and can be
88
+
referenced by later steps via `steps.<id>.outputs.version`.
51
89
52
90
## Example job
53
91
See [Kosli CLI documentation](https://docs.kosli.com/)
Copy file name to clipboardExpand all lines: action.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@ name: setup-kosli-cli
2
2
description: Install the Kosli CLI on Github Actions runners
3
3
inputs:
4
4
version:
5
-
description: Version of Kosli CLI. Use `latest` to install the newest release from GitHub.
5
+
description: Version of Kosli CLI to install. Accepts a full semver (e.g. 2.11.43) used as-is, a major pin "2" or major.minor pin "2.11" resolved to the newest stable release in that line, or `latest`. Defaults to latest.
6
6
required: false
7
7
default: latest
8
8
github-token:
9
-
description: Token used to authenticate GitHub API calls when resolving `latest`.
9
+
description: Token used to authenticate GitHub API calls when resolving `latest` or a major/minor pin.
0 commit comments