Skip to content

Commit 484fe8a

Browse files
mrsimpsonclaude
andauthored
ci: move build-cli to dedicated workflow triggered on release published
Separates binary building from the release job so it triggers via on.release.published rather than on.push (which was blocked by paths-ignore: .github/**). Removes the build-cli job from release.yml. https://claude.ai/code/session_01AvbVaZPypGVUyzNuZ4AtWi --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent da71fa5 commit 484fe8a

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/build-cli.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build CLI Binaries
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-cli:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6
16+
with:
17+
ref: ${{ github.event.release.tag_name }}
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 9.15.9
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: '22'
28+
cache: 'pnpm'
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Build project
34+
run: |
35+
pnpm add @rollup/rollup-linux-x64-gnu --save-dev || echo "Failed to install Rollup platform dependency"
36+
pnpm run build
37+
38+
- name: Setup Go
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version: '1.24'
42+
43+
- name: Install clihub
44+
run: go install github.com/thellimist/clihub@latest
45+
46+
- name: Generate workflows CLI binaries
47+
run: |
48+
export PATH="$(go env GOPATH)/bin:$PATH"
49+
clihub generate \
50+
--stdio "node packages/cli/dist/index.js" \
51+
--name workflows \
52+
--platform linux/amd64,darwin/arm64,darwin/amd64,windows/amd64
53+
54+
- name: Upload binaries to GitHub Release
55+
uses: softprops/action-gh-release@v2
56+
with:
57+
tag_name: ${{ github.event.release.tag_name }}
58+
files: out/**
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)