Skip to content

Commit

Permalink
(internal, generator cli): publish gen cli sdks on release (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Jul 8, 2024
1 parent 7eb83e6 commit 33b0c02
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/publish-generator-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 33b0c02

Please sign in to comment.