make is_new_api_ref.sh always return true for testing purposes #5
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: Generate SDK API references | |
on: | |
workflow_dispatch: | |
push: | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
contents: write | |
jobs: | |
is_new_api_ref: | |
name: Is new API reference? | |
runs-on: ubuntu-latest | |
outputs: | |
new_api_ref: ${{ steps.version.outputs.release }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
id: pnpm-install | |
with: | |
version: 9.5 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
registry-url: "https://registry.npmjs.org" | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Configure pnpm | |
run: | | |
pnpm config set auto-install-peers true | |
pnpm config set exclude-links-from-lockfile true | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Check if SDK changes | |
id: version | |
run: | | |
IS_NEW_API_REF=$(./.github/scripts/is_new_api_ref.sh) | |
echo "new_api_ref=$IS_NEW_API_REF" >> "$GITHUB_OUTPUT" | |
changes: | |
name: Package changes | |
needs: [is_new_api_ref] | |
if: needs.is_new_api_ref.outputs.new_api_ref == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Generate Python SDK API reference | |
id: python-sdk-api-ref | |
working-directory: packages/python-sdk | |
run: ./scripts/generate_api_ref.sh | |
- name: Generate JS SDK API reference | |
id: js-sdk-api-ref | |
working-directory: packages/js-sdk | |
run: ./scripts/generate_api_ref.sh | |
- name: Generate CLI API reference | |
id: cli-api-ref | |
working-directory: packages/js-sdk | |
run: ./scripts/generate_api_ref.sh |