Publish Python SDK #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: Publish Python SDK | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "The version of the Python 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 Python SDK | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| run: | | |
| fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: python-v${{ inputs.version }} | |
| name: Python 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 }} |