Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 2.71 KB

File metadata and controls

93 lines (66 loc) · 2.71 KB

🌿 setup-cli

A GitHub Action that installs the Fern CLI in your workflow — so you can generate SDKs and docs on every push.

Requirements

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.

Usage

Use the major version tag (e.g. @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

With a specific version

- name: Setup Fern CLI
  uses: fern-api/actions/setup-cli@v1
  with:
    version: "3.81.0"

Inputs

Input Description Default
version Fern CLI version to install (latest or semver) latest

Example workflow

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 generate

Releasing

Tag the commit and publish a GitHub Release from the fern-api/actions monorepo:

git tag setup-cli@v1.0.1
git push origin setup-cli@v1.0.1
gh release create setup-cli@v1.0.1 --generate-notes

The release workflow moves the major version tag (e.g. v1) so users pinned to @v1 get the update immediately.