Skip to content

Commit

Permalink
bump CLI version
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Aug 19, 2024
1 parent 1485d04 commit 4eb9f86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
create-release:
release-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -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
32 changes: 15 additions & 17 deletions .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion packages/cli/cli/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.39.8-rc1
0.39.9

0 comments on commit 4eb9f86

Please sign in to comment.