Skip to content

Commit e1ae3eb

Browse files
committed
ci: update workflow
1 parent d1399dc commit e1ae3eb

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

.github/workflows/build-cli-binaries.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
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-
171
name: Build CLI Binaries
182

193
on:
204
push:
215
branches:
226
- '@invertase/cli-binary'
7+
workflow_dispatch:
238

249
jobs:
2510
build:
@@ -57,15 +42,13 @@ jobs:
5742
node-version: '20'
5843
cache: 'pnpm'
5944

60-
- name: Install dependencies
61-
run: pnpm install --frozen-lockfile
45+
- name: Setup project
46+
run: pnpm run setup
6247

63-
- name: Build workspace packages
48+
- name: Build common package
6449
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
6952
7053
- name: Set binary extension
7154
id: binary
@@ -77,20 +60,15 @@ jobs:
7760
echo "ext=" >> $GITHUB_OUTPUT
7861
fi
7962
80-
- name: Compile binary
63+
- name: Build and compile CLI
8164
run: |
8265
cd genkit-tools/cli
66+
pnpm build
8367
bun build src/bin/genkit.ts \
8468
--compile \
8569
--target=bun \
8670
--outfile dist/bin/genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }}
8771
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-
9472
- name: Upload binary artifact
9573
uses: actions/upload-artifact@v4
9674
with:

0 commit comments

Comments
 (0)