From 33b0c02f4d6e7d184ea982e65bacba23ddd2ce4b Mon Sep 17 00:00:00 2001 From: Deep Singhvi <deep@buildwithfern.com> Date: Mon, 8 Jul 2024 19:13:43 -0400 Subject: [PATCH] (internal, generator cli): publish gen cli sdks on release (#1121) --- .github/workflows/publish-generator-cli.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-generator-cli.yml b/.github/workflows/publish-generator-cli.yml index a06a0eef9f..c7581da2ae 100644 --- a/.github/workflows/publish-generator-cli.yml +++ b/.github/workflows/publish-generator-cli.yml @@ -13,7 +13,7 @@ env: NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} jobs: - publish_sdk: + publish-cli: if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/generator-cli@') runs-on: ubuntu-latest steps: @@ -39,3 +39,21 @@ jobs: rm -rf package.json.tmp echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc npm publish --access public + + publish-sdks: + if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/generator-cli@') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 📥 Install Fern + run: npm install -g fern-api + + - name: Publish generator-cli + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: | + git_version="$(scripts/generator-cli-version.sh)" + fern generate --api generator-cli --version "${git_version}" --group sdk