1
- # Copyright 2025 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- #
15
- # SPDX-License-Identifier: Apache-2.0
16
-
17
1
name : Build CLI Binaries
18
2
19
3
on :
20
4
push :
21
5
branches :
22
6
- ' @invertase/cli-binary'
7
+ workflow_dispatch :
23
8
24
9
jobs :
25
10
build :
@@ -58,14 +43,15 @@ jobs:
58
43
cache : ' pnpm'
59
44
60
45
- name : Install dependencies
61
- run : pnpm install --frozen-lockfile
46
+ run : pnpm i
47
+
48
+ - name : Setup project
49
+ run : pnpm run setup
62
50
63
- - name : Build workspace packages
51
+ - name : Build common package
64
52
run : |
65
- cd genkit-tools
66
- pnpm build:common
67
- pnpm build:telemetry-server
68
- pnpm build:cli
53
+ cd genkit-tools/common
54
+ pnpm build
69
55
70
56
- name : Set binary extension
71
57
id : binary
@@ -77,20 +63,15 @@ jobs:
77
63
echo "ext=" >> $GITHUB_OUTPUT
78
64
fi
79
65
80
- - name : Compile binary
66
+ - name : Build and compile CLI
81
67
run : |
82
68
cd genkit-tools/cli
69
+ pnpm build
83
70
bun build src/bin/genkit.ts \
84
71
--compile \
85
72
--target=bun \
86
73
--outfile dist/bin/genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }}
87
74
88
- - name : Test binary
89
- shell : bash
90
- run : |
91
- cd genkit-tools/cli
92
- ./dist/bin/genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }} --version
93
-
94
75
- name : Upload binary artifact
95
76
uses : actions/upload-artifact@v4
96
77
with :
0 commit comments