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 :
@@ -57,15 +42,13 @@ jobs:
57
42
node-version : ' 20'
58
43
cache : ' pnpm'
59
44
60
- - name : Install dependencies
61
- run : pnpm install --frozen-lockfile
45
+ - name : Setup project
46
+ run : pnpm run setup
62
47
63
- - name : Build workspace packages
48
+ - name : Build common package
64
49
run : |
65
- cd genkit-tools
66
- pnpm build:common
67
- pnpm build:telemetry-server
68
- pnpm build:cli
50
+ cd genkit-tools/common
51
+ pnpm build
69
52
70
53
- name : Set binary extension
71
54
id : binary
@@ -77,20 +60,15 @@ jobs:
77
60
echo "ext=" >> $GITHUB_OUTPUT
78
61
fi
79
62
80
- - name : Compile binary
63
+ - name : Build and compile CLI
81
64
run : |
82
65
cd genkit-tools/cli
66
+ pnpm build
83
67
bun build src/bin/genkit.ts \
84
68
--compile \
85
69
--target=bun \
86
70
--outfile dist/bin/genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }}
87
71
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
72
- name : Upload binary artifact
95
73
uses : actions/upload-artifact@v4
96
74
with :
0 commit comments