Publish TypeScript SDK #21
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: Publish TypeScript SDK | |
| on: | |
| 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 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Fern CLI | |
| run: npm install -g fern-api | |
| - name: Release TypeScript SDK | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ts-v${{ inputs.version }} | |
| name: TypeScript SDK v${{ inputs.version }} | |
| # The body will be auto-generated based on commits since the last tag | |
| generate_release_notes: true | |
| # This will create the tag if it doesn't exist | |
| make_latest: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |