Skip to content

Commit

Permalink
add schema extract for typegen
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Nov 20, 2024
1 parent 8168ff8 commit 24302fa
Show file tree
Hide file tree
Showing 4 changed files with 508 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/typegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: TypeGen

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- run: pnpm install
- run: pnpm typegen
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
with:
body: I ran `pnpm typegen` 🧑‍💻
branch: actions/typegen
commit-message: "chore(typegen): 🤖 ✨"
labels: 🤖 bot
sign-commits: true
title: "chore(typegen): 🤖 ✨"
token: ${{ steps.generate-token.outputs.token }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "lcapi-examples",
"private": true,
"scripts": {
"typegen": "pnpm -r run schema:extract && pnpm -r run typegen:generate",
"format": "prettier --cache --write .",
"lint": "pnpm -r lint",
"type-check": "pnpm -r type-check"
Expand All @@ -12,7 +13,8 @@
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-svelte": "^3.2.8",
"prettier-plugin-tailwindcss": "^0.6.9"
"prettier-plugin-tailwindcss": "^0.6.9",
"sanity": "^3.64.2"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 24302fa

Please sign in to comment.