Skip to content

Release C# SDK

Release C# SDK #2

name: Release C# SDK
on:
workflow_call:
inputs:
makePR:
description: Make Pull Request
default: false
type: boolean
version:
description: "The version of the C# SDK that you would like to release"
required: true
type: string
workflow_dispatch:
inputs:
version:
description: "The version of the C# SDK that you would like to release"
required: true
type: string
makePR:
description: Make Pull Request
required: true
default: false
type: boolean
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Download Fern
run: npm install -g fern-api
- name: Release C# SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
if [ "${{ github.event.inputs.makePR }}" = "true" ]; then
fern generate --api api --group csharp-sdk --version ${{ inputs.version }} --mode pull-request --log-level debug
else
fern generate --api api --group csharp-sdk --version ${{ inputs.version }} --log-level debug
fi