Skip to content

Update api spec

Update api spec #624

Workflow file for this run

name: CI
on:
pull_request:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.5.1
with:
node-version: '20.9.0'
cache: 'yarn'
- run: yarn install
- run: yarn gen
- run: yarn build
# Generate the OpenAPI spec. Yes, yarn test generates it.
- run: yarn test
env:
KITTYCAD_TOKEN: ${{ secrets.KITTYCAD_TOKEN }}
BASE_URL: "https://api.dev.kittycad.io/"
- name: check for changes
id: git-check
run: |
git add .
if git status | grep -q "Changes to be committed"
then echo "modified=true" >> $GITHUB_OUTPUT
else echo "modified=false" >> $GITHUB_OUTPUT
fi
- name: Commit changes, if any
if: steps.git-check.outputs.modified == 'true'
run: |
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git fetch origin
echo ${{ github.head_ref }}
git checkout ${{ github.head_ref }}
git commit -am "Generated new lib" || true
git push
git push origin ${{ github.head_ref }}
- name: Bump package.json version
if: steps.git-check.outputs.modified == 'true'
run: |
npm version patch
git push origin ${{ github.head_ref }}