Skip to content

Commit

Permalink
Setup release pipeline to generate api ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Oct 15, 2024
1 parent 291c1fb commit 707b518
Show file tree
Hide file tree
Showing 9 changed files with 605 additions and 620 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/js_sdk_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
pnpm config set exclude-links-from-lockfile true
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: |
pnpm install --frozen-lockfile
npx playwright install --with-deps
- name: Test build
run: pnpm build
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,17 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

- name: Generate API Ref
run: pnpm run generate-api-reference

- name: Update lock file
run: pnpm i --no-link --no-frozen-lockfile

- name: Commit new versions
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add apps/web/src/app/\(docs\)/docs/api-reference
git commit -am "[skip ci] Release new versions" || exit 0
git push
env:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/release_candidates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}


- name: Generate Python SDK API reference
id: python-sdk-api-ref
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
working-directory: ./packages/python-sdk
run: |
./scripts/generate_api_ref.sh
- name: Install JS dependencies
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') || contains( github.event.pull_request.labels.*.name, 'cli-rc') }}
run: |
Expand All @@ -102,14 +94,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


- name: Generate JS SDK API reference
id: js-sdk-api-ref
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
working-directory: packages/js-sdk
run: ./scripts/generate_api_ref.sh


- name: Install dependencies
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') || contains( github.event.pull_request.labels.*.name, 'cli-rc') }}
run: |
Expand All @@ -124,20 +108,11 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Generate CLI API reference
if: ${{ contains( github.event.pull_request.labels.*.name, 'cli-rc') }}
id: cli-api-ref
working-directory: packages/cli
run: ./scripts/generate_api_ref.sh

- name: Commit new versions
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') || contains( github.event.pull_request.labels.*.name, 'cli-rc') || contains( github.event.pull_request.labels.*.name, 'python-rc') }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add apps/web/src/app/\(docs\)/docs/api-reference
git commit -am "[skip ci] Release new versions" || exit 0
git push
env:
Expand Down
Loading

0 comments on commit 707b518

Please sign in to comment.