-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.14 KB
/
CI.yml
File metadata and controls
39 lines (37 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI
on:
pull_request:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm install
- run: npm run gen
- run: npm run build
# Generate the OpenAPI spec. Yes, npm run test generates it.
- run: npm run test
env:
ZOO_API_TOKEN: ${{ secrets.KITTYCAD_TOKEN }}
ZOO_HOST: "https://api.dev.zoo.dev/"
- name: Commit generated files
id: pr-commit
uses: KittyCAD/gha-actions-public/pr-commit@main
with:
app-id: ${{ secrets.GH_ORG_APP_ID }}
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
commit-message: "I have generated the latest API!"
- name: Bump package.json version
if: steps.pr-commit.outputs.commited == 'true'
run: |
npm version patch
# This uses the authentification setup by pr-commit
git push origin "$BRANCH"
env:
BRANCH: ${{github.event.pull_request.head.ref }}