Skip to content

Commit 81c2b73

Browse files
authored
Update workflows (#2)
1 parent 4992224 commit 81c2b73

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
on:
4+
push:
5+
branches: [main]
6+
37
jobs:
48
release:
59
runs-on: macos-latest

.github/workflows/type-check.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Type Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
release:
9+
runs-on: macos-latest
10+
name: Type Check
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '16'
19+
20+
- uses: pnpm/action-setup@v2
21+
name: Install pnpm
22+
with:
23+
version: latest
24+
run_install: false
25+
26+
- name: Get pnpm store directory
27+
id: pnpm-cache
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
31+
32+
- uses: actions/cache@v3
33+
name: Setup pnpm cache
34+
with:
35+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
40+
- name: Install dependencies
41+
run: pnpm install
42+
43+
- name: Check types
44+
run: pnpm run typecheck
45+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "run-p vite:dev devtools",
77
"vite:dev": "vite",
88
"devtools": "vue-devtools",
9-
"build": "vue-tsc --noEmit && vite build",
9+
"build": "pnpm run typecheck && vite build",
10+
"typecheck": "vue-tsc --noEmit",
1011
"preview": "vite preview",
1112
"tauri": "tauri"
1213
},

0 commit comments

Comments
 (0)