Skip to content

Commit c02b81e

Browse files
cloutprotocolclaude
andcommitted
fix: pre-cache electrobun binaries in CI, pin v1.13.1
Electrobun's built-in downloader intermittently 502s in CI. Workaround: curl the core + CLI tarballs from GitHub releases directly into node_modules/electrobun/ before running build. Pinned electrobun to 1.13.1 instead of "latest". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aedc619 commit c02b81e

3 files changed

Lines changed: 73 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
env:
10+
ELECTROBUN_VERSION: "1.13.1"
11+
912
jobs:
1013
build-macos:
1114
runs-on: macos-14
@@ -15,11 +18,19 @@ jobs:
1518
with:
1619
bun-version: latest
1720
- run: bun install
21+
22+
- name: Pre-cache electrobun binaries
23+
run: |
24+
EB_DIR="node_modules/electrobun"
25+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-darwin-arm64.tar.gz" | tar -xz -C "$EB_DIR"
26+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-darwin-arm64.tar.gz" | tar -xz -C "$EB_DIR"
27+
1828
- run: bun run build:prod
29+
1930
- name: Package macOS artifact
2031
run: |
2132
cd artifacts
22-
if [ -d "*.app" ] || ls *.app 1>/dev/null 2>&1; then
33+
if ls *.app 1>/dev/null 2>&1; then
2334
tar -czf "../PumpStudioTrainer-macos-arm64.tar.gz" *.app
2435
else
2536
tar -czf "../PumpStudioTrainer-macos-arm64.tar.gz" .
@@ -37,7 +48,16 @@ jobs:
3748
with:
3849
bun-version: latest
3950
- run: bun install
51+
52+
- name: Pre-cache electrobun binaries
53+
shell: bash
54+
run: |
55+
EB_DIR="node_modules/electrobun"
56+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-win-x64.tar.gz" | tar -xz -C "$EB_DIR"
57+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-win-x64.tar.gz" | tar -xz -C "$EB_DIR"
58+
4059
- run: bun run build:prod
60+
4161
- name: Package Windows artifact
4262
shell: pwsh
4363
run: |
@@ -56,7 +76,15 @@ jobs:
5676
bun-version: latest
5777
- run: sudo apt-get update && sudo apt-get install -y build-essential cmake pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev
5878
- run: bun install
79+
80+
- name: Pre-cache electrobun binaries
81+
run: |
82+
EB_DIR="node_modules/electrobun"
83+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-linux-x64.tar.gz" | tar -xz -C "$EB_DIR"
84+
curl -fSL "https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-linux-x64.tar.gz" | tar -xz -C "$EB_DIR"
85+
5986
- run: bun run build:prod
87+
6088
- name: Package Linux artifact
6189
run: |
6290
cd artifacts

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
permissions:
99
contents: write
1010

11+
env:
12+
ELECTROBUN_VERSION: "1.13.1"
13+
1114
jobs:
1215
build-macos:
1316
runs-on: macos-14
@@ -17,7 +20,20 @@ jobs:
1720
with:
1821
bun-version: latest
1922
- run: bun install
23+
24+
- name: Pre-cache electrobun binaries
25+
run: |
26+
EB_DIR="node_modules/electrobun"
27+
CORE_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-darwin-arm64.tar.gz"
28+
CLI_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-darwin-arm64.tar.gz"
29+
echo "Downloading core binaries..."
30+
curl -fSL "$CORE_URL" | tar -xz -C "$EB_DIR"
31+
echo "Downloading CLI binary..."
32+
curl -fSL "$CLI_URL" | tar -xz -C "$EB_DIR"
33+
ls -la "$EB_DIR/dist-macos-arm64/" || true
34+
2035
- run: bun run build:prod
36+
2137
- name: Package macOS artifact
2238
run: |
2339
cd artifacts
@@ -39,7 +55,21 @@ jobs:
3955
with:
4056
bun-version: latest
4157
- run: bun install
58+
59+
- name: Pre-cache electrobun binaries
60+
shell: bash
61+
run: |
62+
EB_DIR="node_modules/electrobun"
63+
CORE_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-win-x64.tar.gz"
64+
CLI_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-win-x64.tar.gz"
65+
echo "Downloading core binaries..."
66+
curl -fSL "$CORE_URL" | tar -xz -C "$EB_DIR"
67+
echo "Downloading CLI binary..."
68+
curl -fSL "$CLI_URL" | tar -xz -C "$EB_DIR"
69+
ls -la "$EB_DIR/dist-win-x64/" || true
70+
4271
- run: bun run build:prod
72+
4373
- name: Package Windows artifact
4474
shell: pwsh
4575
run: |
@@ -58,7 +88,20 @@ jobs:
5888
bun-version: latest
5989
- run: sudo apt-get update && sudo apt-get install -y build-essential cmake pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev
6090
- run: bun install
91+
92+
- name: Pre-cache electrobun binaries
93+
run: |
94+
EB_DIR="node_modules/electrobun"
95+
CORE_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-core-linux-x64.tar.gz"
96+
CLI_URL="https://github.com/blackboardsh/electrobun/releases/download/v${ELECTROBUN_VERSION}/electrobun-cli-linux-x64.tar.gz"
97+
echo "Downloading core binaries..."
98+
curl -fSL "$CORE_URL" | tar -xz -C "$EB_DIR"
99+
echo "Downloading CLI binary..."
100+
curl -fSL "$CLI_URL" | tar -xz -C "$EB_DIR"
101+
ls -la "$EB_DIR/dist-linux-x64/" || true
102+
61103
- run: bun run build:prod
104+
62105
- name: Package Linux artifact
63106
run: |
64107
cd artifacts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"start": "bun run dev"
1515
},
1616
"dependencies": {
17-
"electrobun": "latest",
17+
"electrobun": "1.13.1",
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1"
2020
},

0 commit comments

Comments
 (0)