A GitHub Action that installs the Fern CLI in your workflow — so you can generate SDKs and docs on every push.
Node.js and npm must be available before this action runs. Add actions/setup-node as a prior step if your runner doesn't include them by default.
Pin to the floating major version (e.g. @setup-cli/v1) to automatically receive the latest updates:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Setup Fern CLI
uses: fern-api/actions@setup-cli/v1- name: Setup Fern CLI
uses: fern-api/actions@setup-cli/v1
with:
version: "3.81.0"| Input | Description | Default |
|---|---|---|
version |
Fern CLI version to install (latest or semver) |
latest |
name: Generate SDKs
on:
push:
branches: [main]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Setup Fern CLI
uses: fern-api/actions@setup-cli/v1
- run: fern generateDispatch .github/workflows/release.yml in the fern-api/actions monorepo (action: setup-cli, version: v1.0.1). The workflow builds the bundle, publishes it to the root of dist/setup-cli, creates the tag setup-cli/v1.0.1, and moves the floating setup-cli/v1 major alias so consumers pinned to @setup-cli/v1 get the update immediately. See CONTRIBUTING.md for details.