From 4eb9f86db5ce0d67b9855b943c814eb7f1ad91a0 Mon Sep 17 00:00:00 2001 From: dsinghvi Date: Sun, 18 Aug 2024 21:41:02 -0400 Subject: [PATCH] bump CLI version --- .github/workflows/create-cli-release.yml | 6 +++-- .github/workflows/publish-cli.yml | 32 +++++++++++------------- packages/cli/cli/VERSION | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/create-cli-release.yml b/.github/workflows/create-cli-release.yml index 902adfcb991..f276483cf19 100644 --- a/.github/workflows/create-cli-release.yml +++ b/.github/workflows/create-cli-release.yml @@ -16,7 +16,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - create-release: + release-cli: runs-on: ubuntu-latest steps: - name: Checkout code @@ -48,7 +48,9 @@ jobs: - name: Display Release URL run: echo "Release created at ${{ steps.create_release.outputs.html_url }}" - publish: + publish-cli: needs: create-release uses: ./.github/workflows/publish-cli.yml + with: + version: ${{ needs.create-release.outputs.VERSION }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index d4ea81dbeae..d27e3f04305 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -1,11 +1,18 @@ name: Publish CLI on: + workflow_call: + inputs: + version: + description: "The version of the CLI to release" + required: true + type: string workflow_dispatch: - push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' + inputs: + version: + description: "The version of the CLI to release" + required: true + type: string # Add this permissions block permissions: @@ -15,7 +22,6 @@ permissions: jobs: live-test: environment: Fern Prod - if: github.ref_type == 'tag' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: - name: Checkout repo @@ -37,7 +43,6 @@ jobs: ./scripts/live-test.sh "$cli_path" "$FERN_TOKEN" publish-rc: - if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-rc') runs-on: ubuntu-latest env: NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} @@ -56,12 +61,12 @@ jobs: - name: Print version run: | - git_version=${{ github.ref_name }} + git_version=${{ inputs.version }} echo Publishing version: "${git_version}" - name: Add version to dev package.json's run: | - git_version=${{ github.ref_name }} + git_version=${{ inputs.version }} cd packages/cli/cli mv package.json package.json.tmp @@ -77,14 +82,10 @@ jobs: - name: Compile run: pnpm --filter @fern-api/cli compile - - name: Publish fern-api-dev CLI - run: pnpm --filter @fern-api/cli publish:cli:dev --access restricted - - name: Publish fern-api CLI run: pnpm --filter @fern-api/cli publish:cli:prod --tag prerelease publish: - if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc') needs: live-test runs-on: ubuntu-latest env: @@ -104,12 +105,12 @@ jobs: - name: Print version run: | - git_version=${{ github.ref_name }} + git_version=${{ inputs.version }} echo Publishing version: "${git_version}" - name: Add version to package.json's run: | - git_version=${{ github.ref_name }} + git_version=${{ inputs.version }} cd packages/cli/cli mv package.json package.json.tmp @@ -125,8 +126,5 @@ jobs: - name: Compile run: pnpm --filter @fern-api/cli compile - - name: Publish fern-api-dev CLI - run: pnpm --filter @fern-api/cli publish:cli:dev --access restricted - - name: Publish fern-api CLI run: pnpm --filter @fern-api/cli publish:cli:prod --tag latest diff --git a/packages/cli/cli/VERSION b/packages/cli/cli/VERSION index 8e6941cbbb1..43df43b3d5d 100644 --- a/packages/cli/cli/VERSION +++ b/packages/cli/cli/VERSION @@ -1 +1 @@ -0.39.8-rc1 +0.39.9