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
- Add actionlint to CI and devbox for static linting of action YAML files
- Add test workflow for resolve-cli (auto/latest/specific version matrix)
- Fix shell quoting in sync-openapi: pass inputs via env vars to avoid
breakage with JSON-formatted sources containing double quotes
- Add resolve-cli README per CONTRIBUTING.md requirements
- Pin pnpm via corepack (packageManager field) instead of devbox package
- Enable direnv integration via .envrc
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A shared composite action that resolves the Fern CLI command based on a requested version. Used internally by other Fern actions to centralize CLI version resolution logic.
4
+
5
+
## Inputs
6
+
7
+
| Input | Description | Default |
8
+
|-------|-------------|---------|
9
+
|`version`|`auto` respects `fern.config.json`, `latest` uses the newest release, `inherit` uses whatever CLI is on PATH, or a specific version/npm tag (e.g. `0.15.0`, `beta`). |`auto`|
10
+
11
+
## Outputs
12
+
13
+
| Output | Description |
14
+
|--------|-------------|
15
+
|`fern-cmd`| The resolved command to invoke the Fern CLI (e.g. `npx --yes fern-api@latest` or `fern`). |
16
+
17
+
## Usage
18
+
19
+
```yaml
20
+
steps:
21
+
- uses: fern-api/actions/resolve-cli@main
22
+
id: cli
23
+
with:
24
+
version: "latest"
25
+
26
+
- run: ${{ steps.cli.outputs.fern-cmd }} generate
27
+
```
28
+
29
+
## Version resolution
30
+
31
+
| `version` value | Behavior |
32
+
|-----------------|----------|
33
+
| `auto` | Installs latest via `npx`, lets the CLI resolve from `fern.config.json` at runtime. |
34
+
| `latest` | Installs latest via `npx` with `FERN_NO_VERSION_REDIRECTION=true`. |
35
+
| `inherit` | Uses bare `fern` from PATH with `FERN_NO_VERSION_REDIRECTION=true`. Fails if `fern` is not found. |
36
+
| `0.15.0` / `beta` / any tag | Installs that version via `npx` with `FERN_NO_VERSION_REDIRECTION=true`. |
0 commit comments