Generate unstable SDK alongside v2.11 (#265) #16
This file contains hidden or 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: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'The version of the SDKs that you would like to release' | |
| required: true | |
| type: string | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'fern/**' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| - name: Download Fern | |
| run: npm install -g fern-api | |
| - name: Determine version | |
| id: bump | |
| run: | | |
| if [ -n "${{ inputs.version }}" ]; then | |
| echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| chmod +x ./scripts/fern/bump.sh | |
| VERSION=$(./scripts/fern/bump.sh --from HEAD~1 --group ts-sdk) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Release SDKs | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| FERN_NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
| run: | | |
| echo "Releasing SDK version: ${{ steps.bump.outputs.version }}" | |
| fern generate --group ts-sdk --version ${{ steps.bump.outputs.version }} --log-level debug |