Release TypeScript SDK #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release TypeScript SDK | |
on: | |
push: | |
paths: | |
- "fern/apis/beta" | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "The version of the Typescript SDK that you would like to release" | |
required: true | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
always-auth: true | |
node-version: '18' | |
registry-url: https://npm.pkg.github.com/ | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}} | |
- name: Build Navigation | |
run: | | |
cd custom-implementation | |
yarn | |
yarn build | |
cd ../ | |
- name: Download Fern | |
run: npm install -g fern-api | |
- name: Release TypeScript SDK | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
if ${{ inputs.version }}; then | |
fern generate --api beta --group ts-sdk --version ${{ inputs.version }} --log-level debug | |
else | |
fern generate --api beta --group ts-sdk --log-level debug | |
fi | |
- name: Update Code Snippets | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
run: | | |
fern generate --docs |