Merge remote-tracking branch 'aws/main' into HEAD #34
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-sdks | |
on: [push] | |
jobs: | |
fern-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install Dependencies | |
shell: bash | |
run: pnpm install | |
- name: Run fern check | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
run: pnpm run docs:check | |
fern-generate-node: | |
environment: sdk-release | |
needs: fern-check | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/node@') | |
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 TypeScript SDK | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
tag=${{ github.ref_name }} | |
prefix="node@" | |
SDK_VERSION="${tag#$prefix}" | |
fern generate --api sdks --group node-sdk --version "$SDK_VERSION" --log-level debug | |
fern-generate-go: | |
environment: sdk-release | |
needs: fern-check | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/go@') | |
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 Go SDK | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
run: | | |
tag=${{ github.ref_name }} | |
prefix="go@" | |
SDK_VERSION="${tag#$prefix}" | |
fern generate --api sdks --group go-sdk --version "$SDK_VERSION" --log-level debug | |
fern-generate-java: | |
environment: sdk-release | |
needs: fern-check | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/java@') | |
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 Java SDK | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_CENTRAL_SECRET_KEY_KEY_ID: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY_KEY_ID }} | |
MAVEN_CENTRAL_SECRET_KEY_PASSWORD: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY_PASSWORD }} | |
MAVEN_CENTRAL_SECRET_KEY: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY }} | |
run: | | |
tag=${{ github.ref_name }} | |
prefix="java@" | |
SDK_VERSION="${tag#$prefix}" | |
fern generate --api sdks --group java-sdk --version "$SDK_VERSION" --log-level debug | |
fern-generate-python: | |
environment: sdk-release | |
needs: fern-check | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/python@') | |
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 Python SDK | |
env: | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
tag=${{ github.ref_name }} | |
prefix="python@" | |
SDK_VERSION="${tag#$prefix}" | |
fern generate --api sdks --group python-sdk --version "$SDK_VERSION" --log-level debug |