-
Notifications
You must be signed in to change notification settings - Fork 52
84 lines (70 loc) · 2.38 KB
/
Copy pathbuild.yml
File metadata and controls
84 lines (70 loc) · 2.38 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build
on:
pull_request:
concurrency:
group: build-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
workflow: ${{ steps.filter.outputs.workflow }}
steps:
- name: Detect relevant changes
id: filter
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
predicate-quantifier: every
filters: |
# Wider excludes than code-quality.yml, which keeps .github/scripts
# and .vscode/.claude in scope because Biome lints them.
code:
- "!**/*.md"
- "!docs/**"
- "!.github/**"
- "!.vscode/**"
- "!.claude/**"
- "!.husky/**"
- "!LICENSE"
- "!.gitignore"
- "!.env.example"
workflow:
- ".github/workflows/build.yml"
build:
needs: changes
# Fail closed: if change detection itself failed, run instead of skipping.
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.code == 'true' || needs.changes.outputs.workflow == 'true') }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build electron-trpc
run: pnpm --filter @posthog/electron-trpc build
- name: Build platform
run: pnpm --filter @posthog/platform build
- name: Build shared
run: pnpm --filter @posthog/shared build
- name: Build git
run: pnpm --filter @posthog/git build
- name: Build enricher
run: pnpm --filter @posthog/enricher build
- name: Build agent
run: pnpm --filter agent build
- name: Build code
run: pnpm --filter code build