Skip to content

chore(cli): publish docs parsers fern definition package and enable openapi merging for fdr v2 step #2

chore(cli): publish docs parsers fern definition package and enable openapi merging for fdr v2 step

chore(cli): publish docs parsers fern definition package and enable openapi merging for fdr v2 step #2

name: publish-docs-parsers-fern-definition
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install
uses: ./.github/actions/install
- name: Install Fern
run: npm install -g fern-api
- name: Get current version and compute next version
id: version
run: |
CURRENT_VERSION=$(npm view @fern-fern/docs-parsers-fern-definition version)
# Split version into parts
IFS='.' read -r major minor patch <<< "$CURRENT_VERSION"
# Increment patch version
NEW_VERSION="$major.$minor.$((patch + 1))"
echo "next_version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Generate docs parsers
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
fern generate --api fern-definition --group docs-parsers --version ${{ steps.version.outputs.next_version }}