add wave component (#1883) #229
Workflow file for this run
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: Publish Generator CLI | |
on: | |
push: | |
tags: ["*"] | |
env: | |
PACKAGE_NAME: "@fern-api/generator-cli" | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: "buildwithfern" | |
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
jobs: | |
publish-cli: | |
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 | |
uses: ./.github/actions/install | |
- name: 🧪 Build and test | |
run: pnpm turbo codegen build test --filter=${{ env.PACKAGE_NAME }} | |
- name: Publish generator-cli | |
env: | |
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | |
run: | | |
git_version="$(scripts/generator-cli-version.sh)" | |
cd clis/generator-cli | |
mv package.json package.json.tmp | |
version_replace="s/0.0.0/${git_version}/" | |
cat package.json.tmp| sed "${version_replace}" > package.json | |
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 |